They are definitely not a good thing to have around your two year old. Tapeworms, whipworms, whatever, they are worms and two year olds are great about putting things in their mouths. Your son doesn't need to eat an actual worm to get sick. Until you go to the vet, you won't know what they are, whether they can live in your kid, or how sick they can make your puppy. Call your vet today and tell him/her about the vomiting and ask if you can bring him in for treatment with the understanding that you can't pay for it until Friday. Then make sure you pay for it on Friday or you'll lose the ability to get a favor from them again later.
Leaving the dog outside is not fair to the dog, and it will increase the likelihood of him ingesting MORE worms and getting sicker if he's left outside where he can eat his own poop, which is something puppies love to do for some reason.
I have a great question for you, though - if you can't afford to spend $30 to go to the vet now to get your dog treated before the worms make him really sick, why did you get a dog in the first place? If a small vet bill is enough to break your budget, you should spend some time thinking very hard about whether you are in a position to have a dog at all. What would you be doing right now if, instead of throwing up worms, your puppy fell down the stairs and cracked his skull , or ate rat poison, or started vomiting blood, or got into an altercation with a possum? Those things definitely could not wait until Friday. I know it is difficult as a dog lover to want a dog and not have one, but sometimes getting a dog is kind of selfish. You want it for your own reasons, but you are not being fair to the dog by depriving it of proper medical care. Consider rehoming him if you can find a reliable, safe, loving home for him. At least until you are in a better place financially.