I heard that melafix was bad for bettas due to the tree tea oil?
Melafix, Pimafix & Bettafix are oil based treatments and can leave an oily film on the surface of water. This can prevent fish from taking in air from the atmosphere. If a fish does get air from the surface, it can get oil in as well.
In regards to labyrinth fishes (Bettas & gouramis), if these fish get oil on their labyrinth organ, it can prevent them being able to breath air from the surface. The labyrinth organ is located in the fish's head and lets them use oxygen from air, to breath. If it gets oil on it, the fish can't breath air from the atmosphere.
The oily film also reduces the gas exchange at the surface and can limit the amount of oxygen (O2) entering the water and carbon dioxide (CO2) leaving the water.
If you use any of these oil bases treatments, you need to increase aeration/ surface turbulence to help maximise oxygen levels in the water, and to help prevent the oily film stopping gas exchange on the water surface.