A few, but they all explicitly require DM's permission
As it is a method of communication, can it be taken as a language?
Not as a part of standart character generation. You will require an explicit DM's permission:
With your DM's permission, you can instead choose a language from the Exotic Languages table or a secret language, such as thieves’ cant or the tongue of druids.
Thieves' Cant is meant to be granted by a unique class feature. Even spells like Comprehend Languages do not allow you to understand Thieves' Cant.
Are there any other rule mechanics e.g. background, that could grant Thieves' Cant?
There are no "official" ways to get this feature other than taking a level in Rogue. However, with the DM's approval, you can get it from a custom background, homebrewed class archetype, or learn as a language.
Lore-wise, Thieves' Cant is anti-language or secret language is the jargon or language of a group, often employed to exclude or mislead people outside the group. It is a skill to hide secret messages in whatever language you are currently speaking.
Rules as written, a DM can allow Thieves' Cant as a custom background feature. See the PHB page 125 "Customizing a background":
If you can't find a feature that matches your desired background, work with your DM to create one
You can also learn Thieves' Cant during your downtime, if there's someone who agrees to teach you:
You can spend time between adventures learning a new language or training with a set of tools. Your DM might allow additional training options.
First, you must find an instructor willing to teach you. The DM determines how long it takes, and whether one or more ability checks are required.