from the information on the post it is unclear if the Doc knew about the AA meeting thing but keep in mind that AA is for alcohol and there are other programs that deal with other addictions and it is certainly possible for an alcoholic to take pain medication as prescribed without getting hooked or reaching for the bottle. So it is vital to know if this guy is only an alcoholic or alcoholic/addict.
It seems that proper communication with the patient and his/her wishes is vital in a case like this and it is obvious there wasn't a clear understanding by the Doc. Hopefully ethics will cover this type of situation
"Teaching only takes place when learning does. Learning only takes place when you teach something to yourself"
Anthony de Mello, SJ