I wish I could remember who gave me this wonderful advice because I'd love to give him/her credit, but, alas....I seem to be having a rather permanent "senior moment" these days.
That said, this person told me to suction the flatworms off the rocks, glass and sand bed with a small airhose. Here's the benefit: You can remove MANY MANY MANY of these pests without siphoning out too much water with a larger vacuum, which doesn't really pull the flatworms up in as great a number anyway.
I've made a tremendous dent in my flatworm population, although I haven't irradicated them yet. It is a rather tedious process, and it's best to look at your rocks through a magnifying glass before you start so that you can target larger groups of them.
Here's what I really like about the process: while it's slower and requires more work, it is completely chemical (thus, risk) free. And trust me, these little @$!!##'s pop right in to a 1/4" diameter airhose and swirl down to the bucket with no problem. I'm on my third siphon, and I really have to look for them at this point. I've made it part of my routine water change now.
I doubt I'll ever get rid of them completely, but if I can keep ahead of their reproduction, I should be able to avoid experimental chemicals, or take a pricey chance on a nudibranch who has a slim-to-none chance in my tank.
Thanks
Leslie