Re: I want to represent my friend in court
Absolutely not. While anyone can represent himself or herself in court, only licensed attorneys can represent others. In fact, that is essentially the definition of an attorney -- someone licensed to represent others before the courts. Practicing law without a license is not only improper, it's also a crime.
You say that you "know proceedings and rules of the court", but the fact that you asked this question demonstrates that there are serious limitations to what you know.
Consider what other things you might not realize you don't know. Do you know what the possible punishments for his crime are? Do you know how to evaluate the strengths and weaknesses of the prosecution's case? What about the rules of evidence -- do you know how to get evidence in and how to try to keep the prosecutor's evidence out? What about selecting a jury, or writing proposed jury instructions? Do you know how to plea bargain -- or even how to decide if a proposed bargain is a good one? Do you know how to preserve an issue for appeal?
My goal here isn't to make you feel bad, but simply to point out that being a criminal defense lawyer is a lot harder than it seems. If your friend needed surgery I'm sure you wouldn't want him entrusting his health to someone who isn't a doctor but thinks she learned all she needs to know from working in a doctor's office. The same principle applies here.
Possession with intent to sell is a serious charge. There may be years of your friend's life at stake in this case, and he needs an attorney to defend him -- not a well-intentioned friend who lacks the knowledge and skill necessary to handle a criminal case.
There are public defenders available for people who can't afford to hire their own lawyer, and your friend should get one immediately. Most public defenders are very good lawyers, albeit heavily overworked. They know what they are doing and can defend him far better than you could, even if you were allowed to do what you propose.