But you CAN raise earthworms yourself. Ours come from the compost bin. And all that goes in there is grass clippings ( we do not treat our lawn with anything ) veg peelings and other plant matter. It's chock full of worms which breed for most of the year, and the baby earthworms are best fed to fish when they are aywhere between 5 and 10 mm long. I feed one or two per week to my mothers betta and he goes beserk for them. All the other fish do as well. Bigger worms can be chopped up for larger fish. As long as you wash them first you should have no problem.
Unless th OP's garden/soil/grass/area the worm was taken from, was or has been treated with any sort of pesticide, weed killer , lawn food ect, then it's unlikely that the fungus or any illness came from the worm.
BZENG21:
It would be more feasible to check the water parameters in your betta's tank with a liquid test kit and see if you have ANY levels of ammonia , nitrite ( both should be zero in a healthy mature tank ) or high levels of nitrate. These can indicate water quality problems which are one of the biggest causes of fish diseases like whitespot and fungus, which it sounds like your fish has.
You should set up a hospital tank for him and treat his disease in that , while in the main tank you can go about clearing up the whitespot and doing a few more water changes.
How big is your tank? Is it filtered and heated? and also, could you show a picture of your bettas tail so we can see what the white stuff looks like? We could help you identify it easier that way.
As for adding the water conditioner, if it is DECHLORINATOR ( look on the bottle ) then it should be fine. But if it say's anywhere on the container that the treatment contains copper, do not add it to your tank, as it will kill your shrimp. They are very intolerant of copper.
To treat your sick fish it's best to set up a hospital tank like I said, a big clear plastic tub with a sponge filter and small heater will be fine for that.