Yeah. Just like 5e has both the Cleric class and the Priest background, 5e Dark Sun could have both the Templar subclass and the Templarate background.
However, if the Templar is a normal 5e subclass, like War domain Cleric, then mechanically there would be only a Background.
A Cleric might be War or Arcana. A Paladin might Tyranny.
...
A Warlock might be ... a normal Infernal pact. Altho there are no devils in Dark Sun, the sorcerer-king is a DEFILER, potentially with the same Lawful Evil, elemental fire, deathly necrotic and poison tropes, and so on. The Infernal Warlock makes a pact with a specific sorcerer-king, rather than with a specific devil.
Of course, 5e Dark Sun can make one or more subclasses that finetune the Templar flavor.
Alternatively, it can be a single Templarate Background, only. Each sorcerer-king will decide for oneself who can be a Templar. Meanwhile, each DM can decide if player characters need apply.
There are lot's of options here, and as others pointed out much depends on the assumtions of the person.
Me, personally, see the Warlock as the perfect envisioning of the Templar class, to the point that I wished it existed back in 2E. I'd just reskin it's "source" as divine* and go for it.
* In 5E power sources are just labels after all, not much of a game effect. Here i just want to mean that it's use will not cause defiling, like all divine or primal magic, while all kinds of arcane magic will. And now that i think about, why is this? Why should magic flowing through the ultimate defilers? Maybe it's part of their condition. Their "curse", so to speak. They are capable of granting powers to others that are in a way better than theirs and they're unable to wield. and that's maybe why they search and select people that can work magic for them without destroying their cities and possessions. Maybe SKs need Templars as much as Templars need SKs...
Thoughts to be explored.