Yes!!
Im thinking of selling 3G and getting 3GS on pay and go but wondering what 02 can do about me selling my 3G whilst in contract...
No, as long as you keep paying your monthly line rental they don't care. They even state it as an upgrade option on their website:
"Option 2 - purchase the iPhone 3G S on Pay & Go.
You can give your existing iPhone 3G to someone you know.
Pay Monthly customers can place their existing iPhone 3G sim card into the iPhone 3G S and receive all the latest functionality. Customers must continue to pay for their existing Pay Monthly tariff."