Praise be to Allah.
If the medicine that contains alcohol is applied to the head, and is not a drink, and the individual needs it, then there is nothing wrong with using it, even if it contains a large amount of alcohol or has a strong smell. But if it is proven that this type of alcohol causes intoxication, and drinking a large amount of this medicine – assuming that one were to drink it – would cause intoxication, then in that case it is not permissible to sell it, buy it or treat oneself with it, because it is khamr.
See also the answer to question no. 1365 .
The scholars of the Permanent Committee for Ifta’ were asked: What is the ruling on using alcohol or khamr in general, i.e., using it in varnish for furniture, or as a remedy or fuel, or for cleaning, perfuming or sterilizing, and using it as vinegar?
They replied: Whatever causes intoxication when drunk in large amounts is khamr, and a small amount or large amount of it is the same. It is the same whether it is called alcohol or is called by some other name, and what you must do is pour it away. It is haraam to keep it to use it for cleaning or sterilizing or as fuel or for perfume or to turn it into vinegar, or any other purpose.
As for that which does not cause intoxication if drunk in large amounts, it is not khamr, and it is permissible to use it for perfume, medical treatment, cleaning wounds, and so on. End quote.
‘Abd al-‘Azeez ibn ‘Abdillah ibn Baaz, ‘Abd ar-Razzaaq ‘Afeefi, ‘Abdullah ibn Ghadyaan, ‘Abdullah ibn Qa‘ood. " (Fataawa al-Lajnah ad-Daa’imah 22/106).
They were also asked (22/297): Some medicines and sweets are sold in the market that contain a tiny amount of alcohol. Is it permissible to eat them? Please note that if a person were to eat this sweet and eat a lot of it, it would never reach the level of intoxication.
They replied: If the sweets or medicines contain a very tiny amount, such that consuming a large amount of them would not cause intoxication, then it is permissible to consume it and sell it, because it does not have any impact on the taste, colour or smell, as it has been transformed into that which is pure and permissible. But it is not permissible for the Muslim to manufacture any such products or to put them into food for Muslims, or to help in that. End quote.
And Allah knows best.