Wa`alaykum As-Salamu wa Rahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
2- As for medicine containing alcohol, the basic ruling in normal circumstances is that it should be avoided unless there is a necessity and there is no alternative and it is prescribed by a trustworthy Muslim doctor.
In his response to your question, Sheikh Muhammad Al-Mukhtar Ash-Shinqiti, Professor of Political Ethics and Religions History at Qatar University, states:
The basic rule in normal circumstances is to avoid the thing that has alcohol as ingredient. Therefore, if you have an alternative medication that is alcohol-free, then it is forbidden to use the alcohol-based one.
This is based on the Prophet’s saying: “What intoxicates in big quantity, a small amount of its consumption is also forbidden.” (At-Timidhi)
However, if no alternative is available, the Fiqh Councils have concluded that based on the rule of istihlak (a case when the forbidden substance is insignificant compared to the lawful one), the alcohol-based medication is permissible.
This is based on the fact that seeking medical treatment is necessary. It is reported that Prophet Muhammad (peace be upon him) allowed `Abdur-Rahman ibn `Awf to wear silk, which is forbidden for men, because he was suffering from scabies (a skin disease).
Allah Almighty knows best.