What do you call a person who always follows the rules, at the expense of everything else? I’m thinking there’s one word that can describe this, but I can’t place it.
A jobsworth is “someone who always obeys the rules of their job exactly, even when it would be more sensible not to”.
The Free Dictionary Online would say that person is:
A person inflexibly attached to a practice or theory without regard to its practicality.
This is also the adjective form. An alternative noun form is doctrinarian.
Also, in Biblical usage, a Pharisee.
I’ve encountered a few people that you describe. Often, they were bureaucrats:
An official who is rigidly devoted to the details of administrative procedure.¹
(Warning: this should not be used in a formal conversation, and might be derogatory or offensive.)
If we focus on the “at the expense of everything else” part of your question, both fanatic and the previously mentioned zealot are good options. Adjectival variations include fanatical rule-follower, a fanatic for X, etc.
From a different perspective, a martinet is a strict rule-follower, but the term is less used nowadays. Martinet has a pseudo-military connotation and draws focus to making other people follow the rules.
If you were using this term in a gaming context, that person would be known as a "rules lawyer".
You could say such a person is lawful.
Conforming to, permitted by, or recognised by law or rules.
Not sure of the original question, but id say that the best word for "rule follower, " is bureaucrat. God dammed bureaucrat. No skilled, bastards. Live in stale cubicles, starring at a computer all day, smelling someones leftover dinner being reheated in the break room microwave. Dreaming up rules for others to follow. Can you tell I'm self employed?