Flatworms are bad. There are certain fish out there that may or may not eat them (like mandarins and wrasses), but it's hit or miss if your fish prefers that food type. There are also medications that you can dose the tank with, but as with all medications you're risking the lives of your inverts and corals if you use it, even if it says "Reef Safe" on the bottle.