Can you charge a battery to run a device at 5V from the USB port?
Yes, this is possible, however from a USB 2.0 port, you can actually only draw 100mA without requesting extra power from the host.  In order to actually get up to the 500mA limit you have to inform the host that you need the extra power during the USB enumeration.  See this post:

How to get more than 100mA from a USB port