All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Scholars mentioned that the forbiddance in this hadeeth is especially for the one who addresses non-Muslims with such titles out of glorification, but if one addresses them with them to identify them or to be polite in speech, we hope that there is no harm in his act, Allaah willing. The author of ‘Awn Al-Ma‘bood said, "The statement in the hadeeth, 'You will incur the Wrath of Allaah (for addressing the hypocrite as 'master'),' this means that you make Allaah angry because you thus glorify him (the hypocrite) while he is not worthy of glorification."
Imaam Al-Munaawi cited the statement of An-Nawawi that reads, "It is forbidden to use such titles for glorification and not as customary way of addressing a person or signifying an official position (or a professional or academic qualification)."
Some scholars held that using such titles for non-Muslims is allowed in case there is fear of harm. Ibn ‘Illaan wrote, "The forbiddance applies unless the person believes that himself, his family, or his property would incur harm as a result of not using such titles."
Allaah knows best.