Maybe it could have been dangerous though- as some worms hook onto organs.
Some old folk remedies have the person taking a milk/sugar bath- to entice a Tapeworm out of the body into the bathtub.
If you get some warm milk sweetened with lots of sugar-- and put it right at the boy's rear-end near the toilet- and try to get the cup so where the worm is touching the milk-, I wonder if the worm may slide into the cup because of the sugar.