Your midwife is talking rubbish. The reason it is hard to acquire OTC medicines is because a) drugs companies can't be bothered to spend the money to test them on pg women (this often applies to children as well, btw, who end up being given approximate doses of things as a result rather than an accurate dose). and b) the guidance is for pg women to be dissuaded from taking nearly everything because of post thalidomide anxiety. Some GPs also haven't got a clue about what to prescribe for pg either, and many dentists certainly don't. So the attitude is usually to tell pg women to put up with all sorts of things because that's the line of least resistance for the professionals concerned. Paracetemol is regularly offered as a kind of placebo to pg women, even though this is not great for your liver and will not touch bad pain.
However this does not mean all OTC drugs are all harmful. Many are fine if you take the correct dose at the correct time each day, not exceeding the maximum dose. The secret is to get proper medical advice from someone better qualified to prescribe than a call centre operator, your midwife or a GP who can't really be bothered to keep up with the latest research on how to prescribe to pg women.
Anyway, this much I know from having horrendous SPD in my last pregnancy and being prescribed things by a top consultant, who spent ages talking me through the medication and risk factors.
Ibuprofen is not a great idea as it can result in fetal heart defects. So steer away from that, as well as any other anti-inflammatories.
Solpadeine Max can be taken as long as you stick rigidly to the dosing regime. This is better than plain paracetamol for dental pain. The advice is usually to take it only for a maximum of three days unless a doctor advises you otherwise.
Codeine Phosphate is available on prescription and excellent for dental pain, but you may get constipated.
Sadly, a fair bit of single malt whisky sucked through a straw, which I find to be a top quality toothache cure, is probably not the best of ideas.
However one solitary and carefully rationed unit is probably acceptable during pregnancy and may help you sleep.
Caveat: I am not a pharmacist, but I would say I am an expert patient when it comes to painkillers while pg.