It's highly unlikely that you contracted worms from your dog unless she licked your face and it got in your mouth. You can also get the bacteria giardia this way which would cause the symptoms you described. Don't let your dog lick your face and don't touch your eyes, nose, or mouth after handling a dog.
More than likely, you had some kind of food poisoning (also caused by bacteria.) The rectal itching could just be from your bottom healing after having all that horrible diarrhea and probably constant wiping.
If you're still concerned, I would get some food-grade diatomaceous earth and mix it in with a milkshake or something. If you do have worms, that will kill them safely. It will also help the dog if you mix it into her food. Google "food grade diatomaceous earth" if you want more information on this.
Yes, there is a very good chance that the puppy could have passed the worms onto you. Worms are pretty easily communicable,I would visit your GP and ask them to run a test to be sure because you are displaying a few key symptoms and think you saw them. Hope everything works out!