IDG Answers is a community of experts who are passionate about technology. Ask a question or answer one below.
It isn't very difficult if you decide to do it. Here is a nice step by step with photos of how to open up a 3GS. You should be able to do it in 10-15 minutes, and that is taking your time at it.
One thing I would mention is to be very, very careful if you use an exacto knife to open up the case - one slip and OUCH! Don't ask how I know. :-(
I would advise against voiding any warranty you may have for your iPhone 3GS. If the conetns are indeed mission critical to your life or job I would suggest you use iTunes to backup your iPhone's data. Then upgrade to the latest iPhone.
Replacing a component in an iPhone may seem like a good idea, though considering the overall lifetime of a gadget it is often times beneficial to upgrade. I myself have been mulling over the idea to replace a hard disk in an iPod Video, though with the iPhone 5 64gb I have in my hands it merely turned into a fleeting thought, as access to all my music, video, notes, and apps are now in the cloud and backed up on a weekly basis.
If the phone has say a personalized engraving, I would recommend purchasing a new phone with the same engraving, if not then upgrading will get you all the bells and whistles of the new iPhone 5. If you still plan on replacing the battery you will be saving a few bucks in the long run, but sacrificing what the newer versions of iOS will bring.
Ultimately the choice is yours, keep tossing cash at an old model keeping it going, or entering into a new contract with a shiny new iPhone. I've been hopping from the iPhone 3G (no voice functions), to iPhone 4 (limited voice functions), to iPhone 5 (full voice functions) with full functionality of Siri with the latest iOS.
Still the overalll decision lies with you.