Unless the fart gets directly into your mouth and someone has some sort of disease then it's unlikely that just breathing in someone's fart or your own fart will cause any sickness except maybe make you gag etc.
I've been around many people who've farted near me and I've never gotten sick from it so I would say that you're certainly safe when breathing farts in although you may find it disgusting and gag.