The short answer to your initial question is yes. A very loud and resounding YES
But it goes much, much deeper
[pun intended, as you'll see momentarily
] than just the ammonia. But on this aspect first, plants need nitrogen, it is one of their macro-nutrients. In the aquarium nitrogen occurs as ammonia, ammonium, nitrite and nitrate. [There is also nitrogen gas, a product of anaerobic bacteria or de-nitrification; I just mention this as it is related but somewhat outside our initial issue.] It so happens that aquatic plants, unlike terrestrial, prefer nitrogen as ammonium, and this comes from ammonia.
Fish produce ammonia constantly through respiration ("breathing"). The breakdown of organics (fish food, fish waste, decaying animal/plant matter) also produces ammonia. In acidic water (pH below 7) ammonia changes to ammonium and plants grab most of it. In basic water (pH above 7) plants still grab the ammonia but have the capability to change it to ammonium themselves, which they then assimilate as their source of nitrogen. Plants are very efficient as using ammonia/ammonium, moreso in quantity than bacteria. In well-planted tanks, the colony of nitrifying bacteria will be less in number than it would be without plants (all else being equal), simply because the plants use so much ammonia/ammonium there is less for the bacteria. This means there will be less nitrite produced by nitrosomonas bacteria, and obviously less nitrate by Nitrospira and related bacteria. This is why you can "cycle" a new tank with plants immediately, or put more correctly, with plenty of plants there will be no discernible "cycle" because they use most of the ammonia.
Moving on; I mentioned organics previously. These occur in vast quantities too, depending upon the fish load. Uneaten food, fish waste, decaying material and such accumulates in the substrate [there's the "deeper" pun]. There is a host of aerobic and anaerobic bacteria living in the substrate. These break down the organics very quickly, and when plants are present, this process is much more effective because the plants work with the bacteria. Plants produce oxygen during photosynthesis, a lot more than the fish could ever use. Oxygen travels through the plant stems down into the roots where it is released into the substrate. Aerobic bacteria need oxygen; the plants provide it. So too does the water flow through the substrate, and this is continual in the aerobic zones. The bacterial action heats up the water, so it rises back up into the aquarium where it cools (relatively speaking), and then the cool water flows back down through the substrate. This thermal flow occurs in nature in all watercourses, and in the aquarium it is very important. The water also brings down oxygen, along with other nutrients for the plant roots. This process also occurs on plant leaves, since bacteria colonize surfaces like plant leaves.
Plants assimilate (use) copious amounts of CO2 (carbon dioxide, their preferred form of carbon which is another critical macro-nutrient) which is produced regularly by fish, plants and bacteria; more CO2 is produced by those bacteria in the substrate than by all the fish and plants in a balanced aquarium. Plants use this CO2 to produce oxygen, and far more than the fish will need in a balanced aquarium.
Plants also have the unique ability to "take up" toxins. Take up means they use the substances but not in the same way as they assimilate nutrients for example. Toxins like heavy metals, chlorine, and more, are all taken up by plants. There is obviously a limit to this, the plants can only take up so much, but in the aquarium these toxins are unlikely to be in quantities beyond what the plants can handle, what we refer to as trace amounts. Most water conditioners detoxify heavy metals and chlorine, but plants can do this even better because they also use some of these as nutrients, and detoxify the rest. Provided they are not excessive, as for instance chlorine would be in tap water.
Plants control algae, big-time. Provided the light and available nutrients are balanced and sufficient for the plants and not beyond, algae will really never be a problem. It only takes advantage when something is out of balance in this equation.
Plants stabilize the pH, preventing it from becoming too acidic. Photosynthesis consumes acids, preventing further acidification of the water.
There you have it in a nutshell.