I was wondering if I could buy a second hand unlocked iPhone 3g/3gs, put an ordinary pay as you go sim in that has unlimited texts and internet, and be able to get unlimited texts and internet on the iPhone as a normal mobile phone?
Yes, just set the APN in the settings to match what your provider needs it to be.
Whether you get 3G internet speeds will depend on the frequencies your provider uses for 3G.