Connecting wall power supply (primary) in parallel with alkaline/NiMH batteries (backup)
The simplest solution is indeed to keep the batteries. However you do not want to connect the 3V wall wart output directly in parallel with the batteries. The alkaline batteries would be trying to get charged from the supply and they are not made for recharging.
Instead you want to arrange a simple circuit like shown below to allow either source to supply power to the load but not allow either one to back feed to the other.