Can you get fleas from your dog?

I recently came over to my boyfriends house after a week of not being here and his dog seemed normal, not itching more than a usual dog. but he had a scratch on his ears with scabbing. Then I woke up today with my stomach and back and my neck very itchy. were taking him to the vet today but is it possible I caught fleas from my dog? I’m also 24 weeks pregnant so I don’t know if that Could also be the cause but let me know if you know anything about this. I guess I’ll found out later but I’m kind of concerned