The short answer is unlikely, but yes you can. Traces of cannabis could be found in your body fluids if you have inhaled someone else’s cannabis smoke (called passive cannabis smoking). It really depends on a lot of factors such as:
How small was the space you were in with the person smoking – i.e. a car or a large room?
How soon after the passive smoking event are you tested?
How long you were present when the smoking was occurring etc, etc.
What type of testing method is used.
However, in most cases where this has been recorded, the concentrations of these traces are too low to give a positive/detected test result for cannabis against the cut-off levels of the Australian Standard.