Advice please, medication & pain

35 weeks pregnant, had 2 teeth removed and im in a LOT of pain because of the palate injections. My whole side of my face and jaw is just throbbing. Ive been taking Tylenol extra strength regularly and I'm afraid that wont cut this pain.

Dentist gave me Tylenol with codeine #3 and told me to ask my dr before taking.

I asked my dr and she said that it's in the same category as opiates and there are a lot of risks but if i absolutely need to I can take one. Just to keep in mind it could negatively impact my baby.

Pharmacist said as long as i only take one if it's really bad i should be fine as the main concern is for developing babies in first trimester and for the baby to be born having withdrawals from it.... Something about respiratory issues...

I'm torn. Im in a lot of pain but i don't want to harm my baby boy or risk anything.

Any advice or experience? Please dont judge ive never taken anything other than Tylenol and ibuprofen in my life time lol