Islam cares about the dignity and honour of Muslims. So, it forbids a man and a non-mahram woman from being in privacy (khulwah) away from people. As for prayer, a man can lead a non-mahram woman in congregational prayer as long as they are not in an isolated place.
Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states: “It is not wrong for the Muslim sister to pray behind you in a room unless you are secluding yourself with her. There is no prohibition in the Shari`ah so long as we do not isolate ourselves with members of the opposite sex.
Prayer is the most excellent deed that we can perform, and we should try to pray in jama`ah as much as possible, for it is 27 times more rewarding than prayers done individually.
Thus, if one finds themselves in such situation, you ought to find a place where you can pray without being isolated with each other. But if there is no such place available and you would be forced to seclude yourself in a tight room, then you must pray separately.”

Dr. Sano Koutoub Moustapha, professor of Fiqh and its Principles, International Islamic University, Malaysia, adds: “Islam does not prohibit a woman to pray with a non-mahram man at all as long as the prayer is taking place in an open area. Accordingly, there is no harm for you to allow your secretary to join you in prayers if she wishes so.”