Why do so many people get this wrong?
If they see or smell it during a traffic stop they have probable cause for a more thorough search. If they spot other evidence of other contraband such as open alcohol or even empty alcohol containers in the vehicle, or a radar detector or what they reasonably believe to be the wiring for a radar detector, they can also conduct a more through search of the vehicle.
And when they are conducting a legal search for one thing, ANYTHING else they also happen to find is also admissible as evidence in what charges are applicable to that other contraband.
As far as personal searches go, even without contraband visible in plain sight or with a noticeable odour, there are still other ways in which the HTA authorizes a cop to search vehicle AND a driver's or rider's person and clothing.
A number of HTA offences are arrestable offences, such as careless driving, racing/stunting. Even passengers charged with seatbelt offences can be arrested in some circumstances.
http://www.e-laws.gov.on.ca/html/statutes/english/elaws_statutes_90h08_e.htm#BK352
Once a driver/rider or vehicle occupant is arrested for an arrestable HTA offence, a vehicle can be impounded, and part of the impound process includes a warrantless search to obtain a full inventory of the vehicle contents prior to impoundment. The higher courts have upheld the admissibility of evidence found during such warrantless vehicle inventory searches.
If a rider or driver or passenger is arrested for one of these arrestable HTA offences, then too a full warrantless body search is permitted as part of the process of taking the arrested person into custody. Again, even if the person is subsequently released roadside, the higher courts have upheld the admissibility of evidence found during such searches that are incident to an arrest for an arrestable HTA offence.
And in case anyone here fails to see the connection, the OP was charged with careless driving which is an arrestable offence according to the HTA, and which then supports a warrantless search of person and vehicle incident to arrest.