What is the best way to block cigarette smoke from the body?
You don't smell carbon monoxide in cigarette smoke. It's odorless. (And not exactly the part of cigarette smoke I would be worried about.)

You smell the other components of cigarette smoke. Which are not odorless.

Holding your breath and getting out of the smoke seems the way to go. Even better would be exhaling, then holding your breath until you are clear.[1]

Carbon monoxide, as well as other components of cigarette smoke like nicotine, are very good at getting into your blood stream quickly. Plus, when at rest, we inhale / exhale at only a fraction of our lung capacity. By (deeply) inhaling (your alternative course of action), you would just get more of the smoke into your lungs than you already have.



[1]: The trick with holding your breath is of course that, if you run out of breath while still in the middle of the smoke, you can't help but inhaling deeply...