It was pointed out in another thread that in standard Civ4 rules, a city cannot flip back to the country it was taken from. However, that was in warfare (IE, back to the county you beat the city out of right after battle) so I don't know if the same thing appies to cities that are given away or not.