Easy way to protect a battery from charging
Short answer: A diode will protect your battery from charging. But be aware that you might lose about 0.7V (depending on what diode you use) of the battery's voltage because of the diode's forward voltage. But this only happens if you connect your circuit on the same side as the diode's cathode is. If you connect the circuit on the anode side, it won't be supplied by the USB 5V, like your battery.

Also as stated in your comments, connecting a 3V circuit to a 5V USB doesn't seem to be that good of an idea.