They can pat you down if they have probable cause to suspect that you are carrying a weapon, but you can't tell someone has drugs (except maybe a pipe) just by patting them down.

Probable cause: A reasonable suspicion that a crime is being committed, will take the place of a warrant in most, but not all cases, and probable cause only works with the crime the officer thought was being committed. He can't search your bedroom for drugs if he sees you possibly hitting a pipe through your kitchen window. He can get a warrant and come back, though.