When a part of a country decides to secede, the “law” doesn’t matter. It’s an act of rebellion. What matters is what the parties to the dispute decide to do about it.
It is an act of rebellion to a country who's laws specifically disallow it, as did the United Kingdom who's laws were based on the "Divine right of Kings" and which required "Perpetual allegiance."
Our laws, however are founded on the natural law principle
that whenever any Form of Government becomes destructive of these ends, it is the Right of the People to alter or to abolish it, and to institute new Government, laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likely to effect their Safety and Happiness.
It is not "Rebellion" to assert this right. It is "Rebellion" to deny people this right explicitly enumerated in our founding document.