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 (jurisprudence) 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).