A bag of drugs fell out of a woman’s underwear while she was getting arrested for drug trafficking, a court has heard.