As for the voting? That's a bit more tricky. They are voting to commit an illegal act. While not morally similar, this would be legally similar to voting to allow women to be murdered for not obeying their husband.
Namely, they are voting to approve an act that is clearly illegal according to their constitution. I am not sure they'd be allowed to put that sort of thing on an officially sanctioned ballot, in the US. However, they could certainly hold a mock election, unaffiliated with the government, and it would only be of value for the optics.
I'm just pretty sure it couldn't be officially sanctioned.
This assumes the pundits are correct and that this is clearly illegal in their constitution. I haven't actually read their constitution and am trusting their information and interpretation.
In the US it's a bit stickier. While we've disallowed secession before, I don't think the constitution expressly forbids it. So, I couldn't quite come up with a similar example to match the US. In fact, I think we may have even agreed that Texas can seceede but it needs to be voted on with the same numbers as they would need to amend the constitution. I think... Don't quote me on that.