Depends on what kind of worms. Planaria? Yes. They are easy to spot with a triangular head. A worm commonly confused with planaria but is harmless is Rhabdocoela. Plus what works on planaria won't work on rhabdocoela anyway. Other white worms would be nematodes and detritus worms. WIthout a photo there's really no way we can help you figure out what worms they are. If you were going to break it down anyway, just break it down. Here's more info on planaria vs rhabdaceola
And by the way, they generally show up from overfeeding...that goes for any worm. They can hitchhike in on plants and snails too but if you've done nothing new in the tank you are probably overfeeding.