All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The basic principle is that it is forbidden to consume alcohol in any quantity and for any purpose because it is Khamr (intoxicant). However, if the due conditions for the Sharee‘ah-acceptable necessity to use alcohol for addiction treatment purposes are fulfilled, namely, trustworthy specialist physicians advise that if a certain person stops drinking alcohol completely, he will die or be harmed, and that he must gradually lower his alcohol intake until he can safely stop drinking without incurring any harm on his health, so if trustworthy physicians make this decision, then it is permissible for him to consume only the specified quantity out of necessity. Allah, The Exalted, Says (what means): {…while He has explained in detail to you what He has forbidden you, excepting that to which you are compelled.} [Quran 6:119]
Necessity must be addressed proportionately, which means that if the patients (addicts) differ in their need for such intakes and duration of treatment, each patient is required to limit himself only to the needed intake and duration of treatment entailed by his necessity. So whoever may be treated in a shorter period of time and with limited alcohol intake must not be given beyond his needed intake during the specified period of treatment, and within the scope of his necessity only.
For more benefit on the necessity that makes what is forbidden permissible, please refer to Fataawa 237190, 90514, 121302 and 90215.
For more benefit on the prohibition of alcohol in Islam, please refer to Fataawa 81900 and 81389.
Allah Knows best.