Oh, I almost forgot - you can go to most pet stores and get rigid 1/4" airline pipe. (It's a small clear rigid tube that people use on old-school under gravel filters.) Attach some flexible vinyl airline tube and use that as a tiny vacuum. There is enough suction to get the flatworm but it's small enough to keep the water loss to a minimum. I vacuum out the flatworms into a filter sock and just throw the flatworm-free water back into the tank.* This is a quick and easy way to get a bunch of the little buggers out.
*When doing this, unplug any auto top off system you might have. You don't want to pump fresh water into the tank as you remove the flatworm infested tank water. Another option would be to suck out the flatworms into a bucket and replace that lost water with freshly mixed saltwater. This would be like doing a small water change.