I have never used ammonia on laundry and have only used it with white rags when cleaning.
For stains, I have found that Pets N Kids works great! I find it in cleaning department at Walmart with the products like Resolve and other carpet spot cleaners. It's also available through Amazon. I do recommend putting it into a spray bottle since it's easy to use too much with the squirt bottle it comes in. My son had a brand new white t-shirt and got blueberry cobbler on it while eating. I thought that shirt was a goner but simply squirting Kids N Pets on it and a little scrubbing, then washing, and the stain was completely gone. Please whatever you use, check the item before putting into a clothes dryer to ensure the stain is gone because the heat will set in the stain.