If you use drugs and take the risk of keeping those drugs in your possession regularly then the chances are that at some stage you will be stopped by the police. Even if you claim to be in a drug rehab program and are trying to get off drugs, it is unlikely to cut you any slack from the police who may arrest you for possession of drugs, or if they suspect you intended to sell them, with the supply of drugs.
When you are arrested for a crime, including for a crime related to the possession of drugs, there are number of actions that the police can take as part of their investigation. One of those is likely to be searches of your property, your person or both. when war use the term property, that can mean your home, your business premises, if you own them, or your vehicle.
Whether they wish to search your property or person, they police may ask first you for permission first, although they are not always obliged to do so. If you give them you consent, it might be the case that once you have spoken to your lawyer, that they advise you to withdraw you consent, which is permissible at any time.
You should be aware, that even if you do withdraw you reconsent there are certain circumstances where the police will still have the right to conduct a search of your property or your person.