The reason I am asking is that, although ltree seems to have been a contributed module since at least 8.3, how can one know if it will always be part of subsequent versions of Postgres?
Whether contrib, core, or an external extension you like will always have ltree available to you.
It is also open source so you could update and compile it yourself in a worse case scenario.
David J.