Julie, I believe that you are right. I remember having read that the batteries do fit but there is a minor difference in size and capacity. So, could you use the same battery. In my opinion, yes.
iPod touch (3rd Gen) Replacement Battery and iPod touch (Gen 2) Replacement Battery gives you the numbers for the batteries.
As for keeping your OS when you do a restore with iPod. Find your *.ipsw for your ipod on your computer and write it down :) I believe it is in C:\Documents and Settings\<Username>\Application Data\Apple or try C:\Documents and Settings\<USER NAME>\Application Data\Apple Computer\iTunes\iPod Software Updates and on a mac Library>iTunes>iPod Software update I think :)
1. Download appropriate iPhone firmware from this page if you do not find your 3.1.3 http://www.felixbruns.de/iPod/firmware/
2. Open iTunes.
3. Connect iPod to computer using USB cable.
4. In iPod summary tab, hold down your shift button on keyboard and click Restore button.
5. A window will appear to browse the iPod software file (*.ipsw file). Select the iPod Firmware/Software/OS that you have downloaded in step number one.
Please wait until the restoring process is complete.Once it has finished the restore process you should get a message saying "Your iPod has been restored to factory settings, and is restarting. Please leave your iPod connected. It will appear in the iTunes windows after it restarts. And that should be all, Hope this helps and good luck.