Basically, when it comes to things like this there's a conflict between two international ideals: integrity of national borders and human rights. And there are some thought provoking ideas in the article. If you think about it, if all of Spain voted in this referendum (since this would affect the resources and borders of the entire nation), what would the result be? There are obviously major and critical differences, but if you look at another issue, Crimea, most people there would actually rather be with Russia. But obviously the rest of Ukraine didn't agree with that. And Crimea actually tried to hold referendums in the past that were blocked by the national government. The "referendum" that Crimea ended up holding (to legitimize the annexation) was declared illegal by the UN, but that's exactly what Spain's constitutional court did in the Catalan referendum.
Very complex issue and not as cut and dry as I had thought it to be.