Ok there are provisions for exactly this type of situation in UK NHS medical guidelines, and the principles from them are applicable in any country. I can't get into the specifics of your case because a.) I am only a medical student and cannot therefore give formal advice and b.) I don't know nearly enough about the complexities of the situation to even begin to form an opinion anyway.
However as an exercise in theoretical medical ethics the question we are being taught to ask when there is a potential disagreement between what a patient is requesting and what we feel is entirely medically justified, is "what would you do if I didn't prescribe this... today?"
Depending on the answer there is then a risk calculation to be made. For example, and without wanting to put words into anyone's mouth, because you've already told us what is happening, clearly if the answer was "well I'd go away and self medicate," that tips the risk one way, while if the answer was "I'd be annoyed but there's nothing I could do..." that would tip things the other way.
In theory if on balance the doctor can demonstrate that the risk of harm was higher in not prescribing, than it was in prescribing with no clear diagnosis, then unless what I am being taught in medical school is wrong, there would be a clear case to be made for providing the drugs.
No doctor wants to do that - because of course it is tantamount to medical blackmail, but of course if you know your medical ethics you can undoubtedly make and argue a strong case.
The central question is, is the refusal putting her at greater risk than provision? If the answer was yes, and it came to an enquiry, I would say that the doctor would almost certainly be on more difficult ground for having failed to prescribe than he would for having taken the risk of doing so.
This all hinges on what someone could PROVE that the people involved knew at the time. If it could be shown that a doctor KNEW that there was no way that a patient could be stopped from self medicating, then their duty of care to that patient would strongly suggest that these drugs should be provided to them in a controlled and safe way in preference to an uncontrolled and unsafe way. Thus refusal in the face of certain knowledge that this patient definitely would continue to self medicate as a result, could possibly constitute medical negligence under certain circumstances...
So while I cant advise you what to do - I can suggest that you that there might be value in thinking about the medical ethics involved, and then having an informed discussion with the doctors involved, as to the best way forward.