I’ve never had flatworms in my home system. Yes, you can permanently eradicate flatworms with multiple doses of that. Just try and remove as many by hand as you can because they can cause damage if a large amount die off at once due to toxin release.
Define flatworms? I have no AEFL but have many others that cause no issues and I'm perfectly fine with them being in the tank. There is a species that lives on my turbinaria that cause no issues and are cool to view.