But in that scenario the NHS are paying pharmaceutical companies for it. They don't produce medicines themselves, they are supplied. How the cure is distributed in the NHS is not the pharmaceutical company's problem, it's the UK government's. The pharma companies who have the cure would make even more money if the NHS decided everybody should get it - they would be lobbying for exactly that.
And it's not an unsolvable problem for a government either, you can just levy a new type of NI to cover it, I don't think people would have a qualm with that. If you do some quick maths, 0.5% get cancer in a year and 70% survive, so only 0.15% would need this cure (maybe less given a lot of those would be older people who are in end of life care and might not want it). Even if it cost £1m per person, it would still be less than a third of the pensions budget - so theoretically affordable, but would mean the average worker paying £100 a month more in tax. To basically be immune from cancer. Many would argue that sounds like a great deal and that is a worst case scenario and could decrease over time as the cost to produce it inevitably decreases.
Even making the most extreme assumptions, it's incredibly hard to see any scenario that could exist where this wouldn't be economic for workers, for governments, or for pharmaceutical companies. It's a straight up everybody wins scenario.