Yes flatworm exit is used in the display to kill of an infestation.
That said there are very specific instructions on how to do this included with the product and they must be adhered to. Also as the flatworm die off they release a toxin that will crash your tank, again the instructions are very specific on this.
Here is a discussion from Melevsreef.
Flatworms (Red Planaria): How to eliminate them from your reef – by Marc Levenson
Small reddish-rust colored creatures may already be in your tank. Or you may buy a coral and they'll appear as hitchhikers later. They may appear on the glass/acrylic, on the substrate, or on live rock. Due to their extremely thin bodies, they are called flatworms correctly. They appear almost two-dimensional, barely a flap of skin or perhaps a 'dangling chad'. They can move through the tank, elongating the front part of their body like a sail filling with wind, latch on to the nearby surface and pull the rest of it's body forward.
They feed on small foods like rotifers, phytoplankton and such, and will grow out of control unchecked. Creating a mat with their bodies, they can smother corals or parts of the substrate. If they get to the point of overpopulating the tank, there is the possibility that they may die suddenly all at once, and the toxin they release at death can cause further deaths and even wipe out a tank entirely. Some predators exist, but results vary. Six Line Wrasses, Leopard Wrasses, Target Mandarins and even Blue Damsels reportedly eat these flatworms, as does one Nudibranch (Chelidonura varians), but some have opted for a different approach when these methods prove ineffective.
Salifert came out with a product over a year ago called Flatworm eXit, a poison that only affects flatworms and is reef-safe. Let me add the qualifier that if your tank is heavily infested, Flatworm eXit will not be the cause if you lose livestock. The issue is that if many flatworms die at once, their toxins reach lethal levels quickly and this, not the product, can lead to deaths in your tank. Feel free to ask others about their results before using this product. When I used it, the only item in my tank that appeared distressed was my Hawaiian Featherduster. Its feathers were shriveled up and wilted and it looked very badly during the treatment, but afterwards it opened up completely. SPS, LPS, soft corals and fish were completely unaffected, as were snails, starfish, crabs and pods. My infestation was low because I regularly siphoned out all I could see each week, before I ever dosed my tank.
What I recommend is that you remove as a many as you can before you treat the tank.
This is what I used, the Flatworm Vacuum™ :
After one session, the bag was filled with flatworms. These were rinsed out in the sink with hot water.
I put the bag in my sump, and sucked out all the flatworms I could reach and see. Starting the siphon was easy by putting the end of the rigid tubing in the flow of a powerhead. I siphoned out as many as I could find every day until virtually none were in sight. The less you have, the less toxins will be released when you treat. If you don't use a sump, you can put the bag in a bucket in front of the tank, and after the procedure, you might decide to pour the water back in your tank. If the water looks cloudy or reddish, it would be better to dispose of it and replace lost tank water with new saltwater.
The day I was ready to treat my tank with Flatworm eXit, I made up 20g of new saltwater for a water change. I also hooked up a canister filter filled with GAC (granulaed activated carbon), and tested it to make sure it was ready to run.