This seems to be the default behaviour already on the Clip+ (with Rockbox)
Cannot confirm for other targets, but I don't see why not (unless it isn't possible)
As soon as you enter recording mode, the mic input is played through the earphones, or whatever is plugged in.