cat has worms!

Okay ladies, I need some help. I found out my cat has worms bc she sleeps right next to me and I found a bunch of dried up rice looking things. When I looked at her bum, sure enough there they were. I am freaking out hard bc I am 5 weeks pregnant and have already miscarried once. Someone please help calm my nerves. She sleeps right next to me and I am so scared it's going to harm my baby