Tails shouldn't affect matrix messaging other than the session always being temporary/amnesic (which I would find tedious).
Given Tails doesn't come with a matrix messenger either use a matrix client in the browser (eg. element web) or install a matrix client (instructions for installing additional software on Tails).
I've not used persistent storage but perhaps it can be used for remembering matrix sessions (?).
If you are okay with other messengers, Tails includes the Pidgin messenger which can connect to XMPP and use OTR encryption. Tails also includes OnionShare which can also be used for messaging over Tor (I don't know whether the included version supports that).