Unfortunately VC 13202.5 makes possession of marijuana by a minor results in a 12 month license suspension whether or not the offense was driving related. You can apply for a critical needs license and/or request a diversion program which may avoid the suspension.
As indicated by Mr. Kaman, you've got to avoid a conviction or you're in jeopardy of losing your license for a year.
Your medical card should be a complete defense to the charge. Even though possession of less than an ounce is only an infraction now, because of the license issue, it's worth getting an attorney to handle this for you so you can keep your license and avoid a conviction.
Have your attorney show the DA your valid perscription card. You can either hire a private attorney or you can see if you qualify for a public defender. As the other attorneys posted, you need to avoid a conviction.