As I said, I don't know your specific medical circumstances (and also, I'm not any kind of medical or pharmaceutical professional — I have an English degree 🤣), but at least to me, the NICE info doesn't seem to be giving a hard, blanket, absolute "no"… though it does discourage medication where possible, which makes sense.
But all of us who get migraines understand that it's not only a real quality-of-life issue, it could also affect your ability to function and take care of yourself properly, and mess with things like your job. It might "only" be pain and other temporary symptoms, but it does seem like they recognise that for some women, despite all efforts to manage migraine non-pharmacologically, the benefits of drug treatment will outweigh any risks to her and her pregnancy.
I'm not sure why your GP and pharmacist would say otherwise, but perhaps they know something about your health in particular, which changes the equation? Or I wonder if maybe they tend to say "no" at this stage in the hopes that it will encourage the patient to find an effective non-drug management strategy, on the assumption that if she can't, she'll come back, and then a conversation might be had about next steps. Though to me, that wouldn't seem a very open and modern way of doing medicine, so hopefully I'm wrong there.
(I've never been pregnant myself, but from the descriptions people give of the medical information and advice they're given by professionals when pregnant, it seems like it's often a lot more absolute and paternalistic than what I'd usually expect, and less likely to involve trusting the patient to understand and balance the nuances and risks/benefits herself.)
I don't know whether you looked at the page in much detail, but if you want to see why they say what they say about triptans, then if you go to the section titled "How should I manage a pregnant or breastfeeding woman with migraine?", scroll to the bottom of that section where it says "Basis for recommendation" and click the "Show" link just below it, it will expand to display links to the information they used for each recommendation.