Assuming your 3V rail is + positive, with respect to ground negative, I would say yes; it should behave as you state ? although a small cap value on the NPN base to ground, or better still base to collector, forming a sample & hold might help to stabilise, when micro goes low.
Rethinking on this; there might be an issue if 3V rail A is below 3V rail B !! but having a common ground... otherwise if the 3V rails are independant of each other as two supplies, then the design should function.