Preduk
The legislation does vary from country to country and airline to airline. Any airlines that do allow passengers in the flight deck are totally restricted to the staff of their own airline and it would be a brave Captain that went outside those parameters. Given events of 9/11, I personally would not permit any unknown passenger regardless of the rules.
To answer your question, Emirates has an emphatic "no passenegrs on the flight deck" rule.