Most likely the moss, piece of bark or soil contained mushroom spores. As mushrooms like dark cool and wet environments, it probably found a good place to grow in your viviarium. As many mushrooms are poisonous (at least to us, not sure if they are as bad for amphibians or other animals) they can be harmful to your frogs. But if they are keeping their distance and not nibbling on them, the mushrooms may be fine to leave in your tank.
I suggest trying to identify the mushroom online or using a fungi identification book (ie: a Field Guide to Mushrooms (or Fungi) type book).
Being pretty much a novice when it comes to proper care of treefrogs my advice may be totally useless though the research part certainly can't hurt LOL. If you are worried insects fed to your treefrog may eat some of the mushroom and risk causing a toxic reaction in your frog, then remove all mushrooms to be on the safe side. It may also be a good ideal to bake any wild collected wood/moss/soil in the oven to kill any unwanted additions to your vivarium (not sure if baking at 250F for a few hours or less (as long as the moss, etc doesn't burn, thin pieces may be more prone to catching fire and it may be better to bleach them then rinse very well, then rinse 5 more times then air dry for 24 hours in a well vented area (ie outside works best) will kill mushroom spores).
One thing I do know is bright colored mushrooms are deffinitely poisonous. However, this doesn't mean light colored or brown mushrooms are all safe either, LOL.