In a divorce, you don't require that all parties agree that divorcing is the right decision. If a single party wants to dissolve the relationship, that is sufficient.
There's more nuance when we're talking about entire states, but I believe the same principle should apply. This particular vote was irregular enough to not really be legitimate, but the Spanish government should recognize that some sort of Catalan referendum has a right to take place.