It will not harm anything, but what will harm your corals is the dead flatworms. So before you add it make sure you have plenty of carbon standing by and your ready to do a water change.
If you can (if it's not to late) syphon out as many as you can with a turkey baster before you do the treatment.