I have no idea about the snails but if the chemical it is known to kill snails, I would personally wait a week or so (and a good couple of water changes) to add them back - or you could add a bunch of carbon to remove any excess. Some others here may be able to offer better advice to you on this.
Be aware, many parasite lifecycles involve stages that aren't easily killed with a single dose so you may need to repeat the dose in two weeks, or if you still see the parasites, or if you are worried that they will return.
Keep in mind, any chemical can cause harm, no matter how safe we think it is. Also, if a worm dies in the body of the fish, and it is not passed, it can decay and cause sepsis (generalised toxicity) which can quickly kill the fish. Unfortunately, that is the risk of treatment. Fingers crossed all will be fine!