Can Encode thoughts be acquired outside of the Dimir Background?

Encode thoughts is only, normally available to characters with the Dimir background.

Is it available to other characters who might get cantrips outside of traditional methods? Like Pact of the Tome or Magical secrets? My intuition is no, because they let you get cantrips off of class spell lists, but this cantrip is not on a class spell list.