Hello, I beat the flatworm with Hydrogen Peroxide 3%.
Add 200ml in 1 liter of water, immersion of 3min, then 15min in other container with aquarium water, another 3min immersion in Peroxide, 15 minutes in another container with aquarium water and enter it back to the display, you can perform the test with a frag, it is normal that Zoa remain closed for 1 day or 2, then they will open without problems, I recommend blowing with a turkey baster to separate the flatworm from zoas, plug or rock, good luck!