A Labour councillor has resigned following a row over whether the party would allow a second referendum on Scottish independence.