Effect of medications

I was planning to treat an outbreak of gill flukes in my Discus tank with 
formaldehyde but I do not know if this is a safe medication to use in the 
presence of plants. Could anyone tell me if formaldehyde is safe to use or 
if it is not then recommend a treatment for gill flukes that they know is 
safe for plants.

In case some plants are more sensitive than others to medications, these are 
the plants that I have growing H.polysperma, H.corymbosa, Vall's, various 
unidentified crypts and swords, Cabomba caroliniana (??), Limnophila 
sessiliflora and Bacopa caroliniana

All the plants except the crypts, Cabomba and Limnophila produce bubbles of 
O2 so these plants should be in reasonable health and capable  (I hope) of 
standing up to a small amount of "abuse"