You should be able to use flatworm exit with no problem, just use plenty of carbon and do a water change after using it. That advice also depends just how bad your population of flatworms is, if it is heavy then they could release enough toxins to kill something. I've only heard of the medicine causing problems with some starfish and urchins.
Thomas