The urban legend site Snopes says tapeworms might have been used for dieting (they classify the legend as "undetermined"):

As unlikely as this must sound, there might be some reason to believe tapeworm diet pills were once marketed in the United States between 1900 and 1920. A number of sources have indicated encountering advertisements for such products, but whether the products advertised actually matched their descriptions would be difficult to verify. (Just because an ad for a diet pill proclaimed the product contained tapeworms doesn't mean it really did — duping people into buying medicinal nostrums by way of making false and exaggerated claims was standard procedure in the days before government regulation of food and drug products.)