Can a 9v battery or AA batteries be used instead of a bench power supply?
Yes, batteries can be used instead of a bench supply. Keep in mind that batteries change voltage as they are drain, and cannot supply the same amount of current as any given bench supply. Plenty of examples online. 

As suggested, you can get a breadboard regulator for batteries. Or for a wall wart to screw terminals (pretty safe as long as you tighten it down and don't trip over it). There are also modules that have barrel connectors or even usb connectors. With a usb power supply, you get a regulated five volt supply.