Yes, and countries can, and do, remove themselves from treaties when they feel it is in their best interest. The most critical one in our time was the anti-ballistic missile treaty which the US withdrew from in 2001.
If a country felt they could control access to and maintain control over, a celestial body I could imagine them withdrawing from the treaty and claiming that body as their own.
[1] http://www.nytimes.com/2001/12/13/international/bush-pulls-o...