Hi, many thanks for the query!
Nothing much to worry, it is quite obvious that contact with pets has caused this accidental ingestion of the worm eggs.
Get your stools examined for the type of the worms.
as per the report & with your doctor's opinion.
Do check your Haemoglobin
& Eosinophil count
Wish you a good health.