You're right, it is an odd question but certainly not stupid. Based on my own limited personal experience in what we Westerners rather laughingly call " The Middle East, " I would say that irrespective of the period or the speaker's own personal loyalties, everyone is usually quite courteous, even if they regard you as a non-believer.
In khedivial Egypt, as in much of the Ottoman Empire, education and rank were held in higher esteem than we tend to do so in today's allegedly egalitarian world. I would suggest that any Egyptian " of the servant class " ( ! ) in 1882 would defer to any person above him in the social order and probably address them as " effendi. " This honourific would apply to almost anyone who was literate, European or otherwise, all the way up to the Sultan himself who was regularly praised with the exclamation " Effendimiz chok yasha " which loosely translates as " May our lord rule a thousand years. " If the speaker wanted to address someone with even greater respect then they might refer to them as " bey, " another honourific that was formally used with military officers above the rank of Major as well as provincial governors and senior members of the judiciary.
Perhaps our historical advisor Dr. Snook can comment on more current usage on "The Dark Continent? "