It happened to me too and now i'm very careful not setting roles to heroes i won't keep in my team. YES you can speak to him to change the role or you can take him/her back to your party to change the role, but sometime you can't because the NPC is deleted, is simply unavailable or left your clan!
This is clearly a bug, if you want to reproduce it, it's easy, set any companion to a role, then make them governor of a city and you will see your party role is locked.
This is simply cause of how party roles are stored, it's a variable in the "mobileparty" object that point at the said hero. If you hero leave the party cause of a quest, being assigned as party leader or a governor, this isn't reset and the hero remains in his role in your party even if he is not in the party anymore. And since the role is already affected, you can't assign a new hero to it.