The FTDI FT232RL chip on the Nano is only powered if the board is being powered over USB. As a result, when running on external (non-USB) power, the 3.3V output (which is supplied by the FTDI chip) is not available and the RX and TX LEDs will flicker if digital pins 0 or 1 are high.
I guess I will use one of Analog inputs for measuring 3.3v if it is available then we have USB power.
I looked at the Arduino Nano 3.0 schematic and it looks like the FTDI chip runs off the same +5V rail as everything else. You should have 3.3v any time you have 5v. The only difference between USB and External power is the voltage on the input side of the 5V regulator.
I guess that won't actually tell you if you are USING external power, just that it's available.
If you are using USB for a data connection perhaps you can detect the loss of communication as an indication that the USB cable has gone dead.
If not, perhaps one os the FTDI pins will indicate the state of the USB data lines.
Another choice might be to put a diode between the USB power and the 5v rail and a supercapacitor across 5v and ground. Then use an interrupt input to sense a fall of the USB power. The supercapacitor should give enough back-up power to allow the software to turn on the battery and go into low-power mode. I'm not sure how the "auto power switching" device works but that might act as the necessary diode.