Praise be to Allah.
Shayk Ibn `Uthaymin (may Allah have mercy on him) said:
“In cases of necessity, there is nothing wrong with the pilgrim in ihram wearing a mask, such as if he has an allergy in his nose and he needs to wear a mask, or if he is passing through thick smoke and needs to wear a mask, or he is passing by a smell and needs to wear a mask. There is nothing wrong with that.” (Majmu’ Fatawa Ibn ‘Uthaymin, 22/130, 131)
And Allah knows best.