You can certainly detect the mode in which the player is playing by using the variable cadetMode. You can then plan hideous consequences depending on the result, including ending the mission.
I don't know of any way of changing it during the mission. (Not that that proves anything.) It's not the sort of thing mission editing can do for you: it's changing the game, not editing/creating a mission.