A PIR or a motion detector (a PIR would be my choice) with a simple on/off switch in parallel with it - both controlling the lights would give what you want.
If switched on via the standard on/off switch, when you switch off and leave the room, the light will stay on for a short time (the PIR will have taken over briefly as it sensed your presence), before going out.