Is there something you can use as a reference, like a regulated power-supply voltage which might be kicked up from the 2 AA batteries by a switching regulator? If so, a comparator circuit similar to Emmanuel's would be an easy way to do it, but connect the non-inverting input to the battery voltage and use the inverting input as the reference and connect it to a resistor voltage divider rather than a zener or orther voltage reference. A common LM393 comparator with open-collector output could feed an LED (through a resistor), with the LED's annode toward Vcc. When the battery voltage gets below the chosen threshold, the LED goes on. With common cheap op amps and comparators coming two to an 8-pin DIP or SOIC, you could use a bi-color LED for an additional state of indication of battery life.
If you want to go further, another thing I've done in our products is to an op amp to make a relaxation oscillator whose duty cycle is set by the input voltage; then I made it so the LED would not flash at all until the batteries got down to about 33% of life left, and then would initially flash once every several seconds, then faster and faster until about two flashes per second when the voltage was too low to operate the product. That way the user has more than just a low-battery indication, but he can get an idea of how much possible operation time is left. I've also done this in a microcontroller, using the A/D input and making the flash rate a logarithmic function, slightly more than doubling for every additional 0.5V drop in the voltage of a 9V battery.