When in doubt, take it to the vet! I referred to the Amphibian Medicine and Captive Husbandry book, a cloudy I can be the result of a systemic infection, or a localized infection of the eye from bacteria or fungus. The possibilities of an untreated condition like this seems to be rather severe. If it is indeed a cataract, it'll take the veterinarian less than five minutes to determine that. Otherwise it will need treatment only a veterinarian can give. Unless this tree frog is getting close to 10 years old, I would not necessarily count on a cataract being the problem.
-----
...the oldest task in human history: to live on a piece of land without spoiling it."
Aldo Leopold (1938)
"Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us."
Calvin and Hobbes (Scientific Progress Goes 'Boink', 1991)