In Pennsylvania misdemeanor charges are brought via the filing of a criminal complaint, not a citation. Also, if any traffic offenses are attached to a criminal charge, everything has to be filed at the same time. So if the officer was considering filing charges related to the drugs, he would not issue a traffic citation at the time of the traffic stop. And you’re not likely to be arrested on the spot unless the officer is going to charge you with a felony.
As far as the deadline for filing charges, that is governed by the statute of limitations. For a traffic citation, the statute of limitations is thirty days, but for a misdemeanor drug offense, the statute is two years.