I wish I had treated mine the first day I saw them. Now I have what is often described as a "plague" of them. They are generally harmless but spread until they cover every surface, which looks terrible. My blennies won't wat food that lands on them, they aparently taste terrible.
Sixlines snack on them, but won't control a plague. Now what I do is use airline tubing (running into my sump through a nylon stocking filter) to siphon them off rocks. I did this aggressively for a while, and actually started decreasing the population - but then went on vacation, came back to entire tank covered again.
They produce toxins when killed, so if you use flatworm exit (a medicine) you risk blinding or killing the fish from the toxins, the only hope is to use activated charcoal filters to absorb it to keep the levels minimum. The other solution is to buy a velvet nudibranch, which is a slug that eats only flatworms.
I first saw these things on a piece of liverock, watched the population grow like an idiot (thought they were a type of plant life, since they attached themselves in neat rows on the rock) when what I should have done was sucked them all out.
Good luck!