I echo Ghilly's statement and advice. Same here, and I wouldn't worry. I will add that I am so happy to read that you have rescued this poor animal. Makes me furious to see that people have pets and shouldn't have them. Why have a dog and then tie it up?? Glad you are taking it to the Vet for a thorough check up. This is similar to a situation my daughter got one of her dogs from. Yes, nice dog chained to a tree in the back yard. She has turned out to be one of the greatest dogs and is completely devoted to my daughter. Good luck and ^5.
Chances are excellent that nothing has been transmitted to you. You normally have to come into contact with the dog's feces if they have an internal parasite infestation to actually get them yourself. Most people never get them from simply petting a dog. It's far more common for toddlers to become infected because they will pick up a piece of poop without realizing what it is and then put their hands in their mouths. Of course, this is not to say that you couldn't get them, but it is very, very unlikely.
I wouldn't worry at all if you only petted and hugged the dog, especially if the dog is healthy. I have had dogs and cats as pets my entire life, I have worked in several veterinary clinics and have been involved with dog and cat rescue for upwards of 40 years. I have handled stray animals and peoples' pets and cleaned up some horrendous messes at vet clinics and kennels and have never gotten parasites from them, and I have a compromised immune system because of a neurological disease that I have. If *I* haven't gotten them yet, it's HIGHLY unlikely that you will have gotten them from the interaction that you described.