In Texas, the answer is yes! However, if you provide the DA with a copy of your prescription, the case will most likely be dismissed. A valid prescription is a defense to prosecution, it is not a defense to arrest. In short, if an individual is carrying prescription medication without the prescription, the police will most likely arrest that individual if he or she comes into contact with the police.
Another scenario that accidentally gets individuals arrested is when a relative or friend gives an individual leftover prescription medication. If that individual comes into contact with the police while carrying someone else's prescription medication, the police will arrest that individual and that individual does not have a defense to prosecution.
Be very careful if you are driving around with prescription medication, you could be arrested.