A simile has to include either “like” or “as”
When relating to a rule, your sentence can be: Rules are as unnecessary as hall monitors. Or something of the matter.
The sentence can relate rules to anything, and as long as it includes “like” or “as” it is a simile. Since I do not know the context, my sentence is not as fully developed as yours can potentially be.
Hope this helps comment below for more questions:)