Praise be to Allaah.
If the oil is derived from the hashish which intoxicates and which is not allowed to be sold because it contains forbidden intoxicating substances, it is not permissible to use it. Allaah does not put the cure of the ummah of Muhammad in something that He has forbidden for them. If the hashish in question is the hashish which causes intoxication and is classed as a drug, then it is not permissible to use it and treat disease with it. These drugs are harmful and are themselves a disease. It was narrated from Umm Salamah that the Prophet (peace and blessings of Allaah be upon him) said: “Allaah does not put the cure for my ummah in something that He has forbidden to them.” And Allaah knows best.