Up until the last 100 years, all our ancestors, including all nursing mothers, would have continuously hosted a range of helminths and, while those living in industrialised countries today have now mostly lost contact with intestinal worms, more than a quarter of the human population is still colonised by soil-transmitted helminths, including 740 million with hookworms, and this obviously must include a lot of breastfeeding mothers, many of whom will be regularly acquiring new worms.
It is also the case that light infections with the human hookworm, Necator americanus (NA), are considered so benign by the US Centers for Disease Control and Prevention that they do not recommend their removal so, in most cases of hookworm infection, no treatment is required. Nursing mothers are not mentioned by the CDC as being an exception to this.
There are helminths that are able to migrate to a child via breastmilk, but most do not.
And none of the species used in helminthic therapy ever reach their host's mammary glands.