It's possible to trade cities to other civilizations, but I'm uncertain how cities received through a trade behave. Do they suffer any penalties compared to cities I built myself, or do they behave the same?
I once received 5 cities from an AI. The cities behaved as if I conquered them. I had the option to occupy, puppet or raze. There was so much unhappiness that I gave two of them back.