Did the police officer give you a ticket for the license plate?
A police officer doesn't need much to pull a car over. Doesn't need probable cause. He only needs something called an articulable reason. That is, he can't pull you over on a hunch. He has to be able to explain why.
What he can't do is pull you over on a pretext -- a false excuse. If his reason was that your plate was missing, and he didn't ticket you for the missing plate, and if, in fact there was no missing plate at all, then his stop was pretextual. It was only after he stopped for the plate that he discovered the warrant.
So it would appear that the stop and subsquent search and seizure may have been unlawful and in violation of your Fourth Amendment rights. However, that in and of itself won't make this case immediately go away. The US Supreme Court has said there are no hard rules about what isn't Constitutional. Every case must get decided on an individual basis at a special pre-trial suppression hearing designed to explore and challenge whether the police overstepped their authority.
If you wish to fight these charges, your lawyer will be able to get you such a hearing. At such a hearing,the prosecutor will call the officer who will take the stand and tell why he pulled you over and how it led to your arrest. Your lawyer would get the opportunity to cross examine the officer and show how he violated your rights.
The standard that the court must use to judge such a hearing is what a reasonable officer would do under the same circumstances. If the judge finds the search unreasonable, the drugs seized could be suppressed and your case could be dismissed at that point.
If the judge finds the police conduct reasonable, on the other hand, the charges will stand and the case will move forward to jury selection and trial.
You don't, of course, have to have the hearing or go to trial. There would likely be a plea offer available to you. But whether you want to negotiate a deal or challenge the stop at hearings, you should have a lawyer representing you here.
If you can afford one, have him with you at your arraignment, and he'll take it from there and advise you based on what he learns about your case. If you can't afford an attorney, plead not guilty at your arraignment, tell the judge you cannot afford private counsel and ask him to appoint you a free lawyer.