I'm linking here to a Canadian book on the subject of the developing understanding of the inherent rights of ecosystems:
https://ecwpress.com/products/rights-of-nature?_pos=1&_sid=bc5fe1ae7&_ss=r

Here is a link to the Global Alliance for the Rights of Nature:
http://therightsofnature.org/what-is-rights-of-nature/
This approach prompts the question, how would enforcement work? Mainstream economists would shake their heads and dismissively mutter, 'tragedy of the commons.' This is a supposed lesson from history, that when natural resources are held in common, each user has an incentive to use up as much as possible for their own enrichment, and so the commons will be inevitably be destroyed. So the solution is to privatize all such resources. But that 'lesson' is not historical at all, it's merely an economists' thought experiment of what would happen if the users have no norms governing their use of the resources. In a study of several traditional societies where resources were/are held in common, such as pasturage, fisheries and forest lands, Elinor Ostrom showed that users collectively prevented 'tragedy of the commons' overuse situations from arising, over centuries of use. So, this 'rights of nature' idea could really be fleshed out by combining it with Ostrom's ideas on management of common pool resources. This is decentralized management by stakeholders who use of the resources, who have an interest in their sustainability. See https://en.wikipedia.org/wiki/Elinor_Ostrom.