The reason that we have social rules is to restrain those who create trouble. However, when we have Dharma, such rules are not needed. This was the basic message of the text called On Why Monks Do Not Bow Down Before Kings (沙門不敬王者論) written by Lu Shan Hui Yuan in China in the year 404. Of course, some rules are purely for convenience and are essentially etiquette designed to maintain order and civility within a group. They have no moral content. However, there are some slippery border areas here. Maintaining order may mean maintaining oppression or protecting a status quo that is cruel or deceitful. Then, although the rule itself is merely conventional, it is a convention in support of an immoral system and breaking the rule may be one way of demonstrating against the system. A recent example might be the American sportsman who refused to stand for the national anthem as a protest against racial discrimination in the country. The rule itself - standing for the anthem - is not iniquitous, but breaking it was one way of making a point.
Dharma should make most rules redundant. A Dharmic society should not need to be much concerned with 'crime' and certainly not with punishment. However, people are people and in any group of humans it seems to be virtually inevitable that conflicts and divisions arise. When there is plenty of space, this is not much of a problem - groups that want to live differently can simply go somewhere else and do so. Schism, in such circumstances, is not the end of the world and may be the beginning of peace. There is no absolute reason why we should all be nor do the same.When this is not practical, the problem is more difficult.
Of course, there are extremes. There is a value in compromise and also in accommodating the preferences of others, so long as they are not evil. People who follow Dharma are relatively easy to get along with in some ways because they see such differences as trivial and do not get het up about them. On the other hand, to most conventional people the Dharma practitioner may seem awkward because he or she does not readily follow the tramlines of society laid down by materialism, consumerism, status and security seeking and the general soap opera of conventional life. The Buddha quite plainly said that there is no nirvana to be found within the conventional life, that in order to follow Dharma one has to 'go forth' from it into the 'homelessness'.
Hui Yuan is generally regarded as the first supreme priest of Pure Land Buddhism in China. He started a society for the practice of contemplation of Amitabha Buddha. However, even Hui Yuan decided at one point that he had to expel a member because he always turned up drunk and made trouble for other members. There is a precept in Buddhism against getting inebriated. However, perhaps we should not see this incident as the application of a rule so much as a case of dealing with a situation in a one-off manner. The drunk was tolerated for quite a while before Hui Yuan drew the line. Whatever rules one has one still has to deal with instances one by one. Absolute rules tend to involve a cruelty of their own and so are, in general, to be avoided, if possible.
The general point is that the Dharma practitioner (and any truly religious person) has a reference point that transcends the worldly one and that is his or her true refuge. It matters not that an injunction or decision may be the result of a vote, legal process, ancient tradition, or judgement by a respected authority, if it is right it is right and if it is wrong it is wrong and the practitioner cannot avoid responsibility for his own decision. "I was just following orders" or "But we have a procedure" is no ultimate justification. While there are innumerable occasions in which it does no good to flout convention and there is no harm in following it, in the last analysis it is Dharma that matters.