Are they tiny whitish wormy looking things that crawl across the glass ?? If so they are harmless and would be a good treat for any fish...though wondering why your betta didn't eat them.
Also, how often were you cleaning his little bowl ? You can keep betta in one gallon bowls but you have to be strict about keeping up on maintenance. Doing a 50% water change twice a week isn't too much for a tank that size. Planaria feed on the dietrus that settles in your tank..as far as I know..and if you have alot of "dirts" in your tank you can get lots of those little worms. Most tanks have them in there, but you almost never see them unless they become overproductive from having lots to feed on.
If you want to get another betta for your tank I would do a super cleaning on it first...and then be sure to clean it twice a week from then on. If you don't want to have to clean the bowl so much, you might consider at least a 5 gallon. You could put a filter and heater in a tank that size and do a 20% water change once a week. You could also add a tank buddy for your betta.....a few shrimp..(though the betta tend to eat these after a bit..lol)....or....a couple of ADFs (african DWARF frogs...NOT the CLAWED frogs!)
The frogs can be hard to feed with a fish in there, but if you get some sinking pellets and distract the betta while you drop them in (The same location every time..the frogs will learn to know where to look for it) Have a plant or something in that corner so that the pellets sinks out of site of the fish....the frogs will find them. Just check that spot for any leftovers the frogs might miss..so you can syphon it out so it doesn't foul the tank.