Fairly sure the empire wouldn't agree to such a trade, considering they have a vastly superior military that is bound to win if they decide to just take it anyway. Sure, the war will cost them, but less than trading away some territory that is already well-integrated with their logistical infrastructure and the subsequent need to build forts along a new border.
But yes, like I mentioned appeasement strategies doesn't really work normally. Only reason it could in this case is because once they have the port they want, doing a costly war will not be worth the loss of resources (specifically because iirc there was a huge forest between them full of monsters. So any territory they manage to conquer will be very difficult to hold, logistically cut off even for merchants in peace-time, and not really fulfilling any of their country's import demands - with the port only worth the effort because access to sea is huge).
Rather than trading territory for territory, I think asking the empire to provide some resource in return instead would be more reasonable and not likely to shift the cost-benefit analysis back to "war is cheaper". Like a portion of some production from some mine, or a promise of free food aid in some future famines, or the like.
This is also why I mentioned having the port as a "shared city", as signing it over entirely is not quite worth it if empire gives nothing in return (but kingdom needs to balance what they give and what they demand in return, such that the superpower doesn't decide to just squash them under their boots).