Your best bet is to consult with a local lawyer and see if you need a lawyer when you go to court. I agree that if you can arrange to get an immediate blood, urine or hair test for marijuana, get it right away. However, realize that sometimes those tests will show up prior use for quite some time, so be careful.
I suggest you plead not guilty and fight the charges - especially since you are not guilty.
Your options depend on whether this is a criminal or civil charge. If this is a civil offense and you are only facing a fine, then you should contact the prosecutor or show up on your first court date. Sometimes, the prosecutor will amend the charge to something not as offensive (i.e., disorderly conduct or littering). The clerk for the court handling your ticket may be able to tell you what the prosecutor usually does in situations like yours.
An attorney may assist you in negotiations/help you get a better deal for a civil offense. But if this is not a criminal offense, then you are not guaranteed representation under the Constitution. You would have to hire a private attorney on your own, which is generally much more expensive than dealing with the situation yourself.
If this is a criminal charge and you are facing jail time, then you need an attorney on your side no matter what. Contact local, experienced criminal defense attorneys. Most initial consultations are free. So, you have nothing to lose at first.
If you cannot afford a private attorney, contact the local public defender's office and see if you qualify for assistance. If you do not not, then ask the court to appoint a low-cost attorney to your case. (Generally, the public defender's office must turn you down before the court will consider appointing you an attorney.)
For criminal charges, some counties offer first offender programs or drug courts in which you are placed on a form of probation. If you complete the probation successfully, the charges might be dismissed or amended to a civil violation or the like.
Keep in mind being convicted of a drug charge (criminal or civil) may make it more difficult or even impossible for you to obtain student loans for college, especially considering this happened in the dorms. You are also likely facing some sort of administrative action by the college, which may include a warning, suspension, expulsion, or getting kicked out of the dorms.