Possession of a prescription only drug without a prescription is only an offence if the drug is also controlled under the Misuse of Drugs Act 1971 and possession is thus specified as an offence.
The legality of possessing a prescription-only drug without a prescription depends on whether it's listed as a controlled substance under the Misuse of Drugs Act 1971, making possession illegal in such cases.