Thanks for posting your query.
Having worm infestation due to infected water is common but it should not be left unattented. It needs diagnosis of the species for a proper treatment which must be done. A stool examination for ova and cyst
is the appropriate investigation for this.
The weight gain is a different and unrelated issue to the worm infestation and should be handled in the usual ways of dietary control, avoid fatty fried and fast foods and observe a regular life style with moderate exercises to conrol weight.
Hope I have answered your query.
If you have any questions I will be happy to answer.
Please close the query if you have no other questions.
Wish you a good health.