A state is by law part of the country. Much of the country was gained by the governments actions to gain the property. Some was purchased from other countries were others were fought and bleed for. This means the country as a whole, Has legal possession of all it's lands. Seceding from the country is theft as you are not compensating the legal owner for what your taking possession of and theft of territory should never be tolerated.
On the other hand, If you or your group have the finances to purchase the territory and the country is willing to part with it, You could legally succeed from the union. This has a further issue of how to survive as your own country. After all, Any military items and people would go back to the nation so you now lack any military defense. You would either have to fund and build your own military or rely on the protection and some leadership of the country you just left. You would also have to work out trade deals, Not just with existing foreign countries but the one you just left. Basically, Everything you took for granted is now on your shoulders. You fail and you might be allowed back but your not going to get what you paid as your offering something that is in a worse state than when you purchased it. They may not even be willing to pay you anything at all for the territory, Just the option to rejoin or crumble under your own failure.
Personally, I would love to see California try this. Sure, Right now they are the main are we export to the west but we have other states along the same coast that will suffice. What will they do when their national trade income goes away? Many of the other industries may also flee inevitable tax increases that they would enforce so much of that will be gone. How will they protect their very long shoreline without a far smaller population to fill their military ranks. Being so close to North Korea, And how many nations leader view their film industry, They would likely become target #1 for anything from nuclear strikes to invasions. For the rest of us, It would be easier to contain hold them back from crossing into Oregon and defending the mountain passes that separate Cal. From the rest of the nation makes it easier for us. If they turn to a strict democrat ideology, Odds are the citizens won't even be allowed guns to defend their homes against an invasion. My guess is, It would't be long before they crawled back begging to rejoin the union unless they were taken over before they could do it.
The U. S. Constitution never explicitly discusses secession from the Union. There is no protocol or procedure for state to follow if it wanted to succeed from the rest of the United States. On the other hand, The Supreme Court has consistently argued that secession from the union has no legal standing, And any attempt from a state to leave the Union is illegal. Just look at the civil war as an example of what happens if you try and leave the Union. In 1869, The Supreme Court ruled on the matter decisively, In Texas V. White in which the court found that once a state joined the union it entered a "indissoluble relation" with the rest of the United States. So no a state does not have the right to leave the Union.