Can the iPhone 3GS function as an iPod Touch if I remove the SIM card?

Once the iPhone 5 comes out, I'm planning on switching from the iPhone 3GS to the iPhone 5. When that happens, my iPhone 3GS will no longer have an active SIM card. Will I still be able to access the features on the iPhone, such as Wi-Fi, Music, and other apps such as games? I won't need the Messages or Phone apps.

No the sim needs to be in it, just turn off the 3g? And don't top up?

No you can't. Just find a free SIM and put it in, it will do the trick.