Yes, as I recall, when you are in contact with another leader cities are one of the things you can put on the table in trade negotiations. The AI is very reluctant to do this in Civ IV, however. I remember playing a game of Civ 3 in which I spent all my time conquering my continent, so that by the time the other continent contacted me, I was way behind in tech, but had so many cities that weren't doing me any good that I quickly caught up by trading them away, then taking them back.
However, I don't think this is a modding question.