I strongly advise you to retain a private attorney to advocate on your behalf before any charges are filed. A public defender will not do this because they only receive appointment once charges are filed and you have to appear in court. You raise some interesting facts but there is not much I can tell you without seeing the reports except that it is possible that both of you get charged for possession of a controlled substance, and you may be eligible for a drug program.
The only really good thing to discuss with your lawyer is whether you are eligible for a program if the search and facts support the charges.
Contributions on AVVO.com in no way create an attorney-client relationship nor are they intended to be relied upon as a course of action without having first consulted directly with an attorney, where the specific facts and circumstances of your case can be fully discussed.
Hire a private attorney immediately to try to prevent the DA from filing against you. If you wait for the PD, the charges will have been filed, and the fight is on. If on probation, you may be illegible for revocation and reinstatement same terms and conditions depending on the circumstances. But it would be better to try to cut this off before it happens if possible at this late date.
Yes, depending on some nuances, you may be able to earn a dismissal. There are several possible routes. Be aware that the PC 1000 route can be used a second time IF the first time through was not within 5 years.
Something to consider, and have the PD look into, is who rented the motel room? If it was you, and not the co-defendant, then the police may have conducted an illegal search.