Who sets the rules of an online community?
Usually, when a community gets started the one who launches the community prepares a set of initial rules. (So I think we can say that the initial rules are set by a community manager). Let me point out here that it is virtually impossible to create rules in advance for every possible situation. The rules should and will evolve with the evolution of the community, usually, when it grows in size.
As the number of users grows, you will see more unique interactions that the current rules do not cover, including the bad ones. That will cause tension in the community/. The best option for you is if the users themselves start discussing the issue. If they don’t you (the community manager) need to initiate a discussion of an issue. Then you need to lead the discussion to some desired outcome and when the consensus is reached, introduce a new rule.
Please note that if you simply introduce a rule without giving users a chance to discuss it, it will cause a lot of disagreement among the users. At the same time, the goal of any rule is to explain the desired behavior. Having a rule will not make users follow it per se. Users should know about it and agree with it. It is very important to sell them under a new rule.
To sum it up, in a perfect world, a community manager helps the community to monitor the situation, identify needed rules, facilitate the discussions, and make users internalize the consensus that has been reached.