You don't need a doctor. In the UK today there are pathways for Advanced versions of several non-doctor careers which get you either limited, or in some cases full blown unlimited prescribing rights. I think ordinary Advanced Midwife is just a set of common pregnancy drugs, stuff so you can keep down food, sleep properly and so on despite some of the nastier but still non-critical pregnancy side effects, but Advanced Nurse Practitioner and Advanced Pharmacist are both full blown prescribing rights.
The only thing which I think Advanced Practitioner doesn't get you is going entirely off piste, like fuck it, maybe this untried drug will fix your cough. But the person with their name on the pharmacy paperwork can sign off any ordinary stuff, far beyond just "common cold" treatments, anti-nausea, anything a doctor signs on an average day unless they're in some weird research field. The idea isn't that you'd need a GP appointment but that probably it shouldn't be with the bubblegum and cornflakes in the supermarket without even talking to a professional.
Not to mention veterinary pathways. My ex GF was volunteering at a vet practice, where they kept no track of their meds, other than "hey boss, we seek to be low on Ketamine, swing past the animal pill shop and get a load of it pls".
Also there are travel pharmacies, which will sell you prescription drugs, so long as you insist you're about to go travelling somewhere remote.
The whole pretence that dangerous drugs are controlled and kept away from people is a pretty thin veneer.