Governments tend to have provisions for resuming private land, so its questionable that the Federation had no right to hand over planets to the Cardassians. Not to mention that these planets were in a disputed region, which brings in the question whether the Federation or the Cardassians had the right to settle on some of these planets at all.
I feel sorry for those who where negative impacted by the treaty, and maybe the Federation did give up too much in the Treaty. In the end the Federation was looking to end the risk of a restart of a war against the Cardassians while at the time there was instability in the Klingon Empire, the Romulan Star Empire had returned to prominence and was throwing its weight around, and Borg had also wandered in, destroyed a colony, dozens of ships and nearly took Earth. So the few in the DMZ were sacrificed for the greater security of many.