When we got our new puppy I laid a great lawn on our balcony (an amazing 1m2 patch of grass) that sadly had to be replaced after a few weeks due to yellow spots. I found a product with the name Dog Rocks that is said to prevent this issue. There are some sketchy claims on the site - such as that the pH of dog pee remains the same, and ammonia in water being reduced (was I giving my little dog ammonia!?).
A study by McGill University is given as evidence here.
Are "Dog rocks" more useful than pet rocks? They definitely seem to be sold a lot going by Amazon's number of reviews for them.
Given the lack of any credible information on the website selling them and nothing resembling a scientific explanation, I would say that they are next to worthless. Basically they would have to show that the rocks had some chemical that dissolves in water and that would considerably lessen the ammonia/nitrogen content in dog's urine while not harming the dog.
Their "technical blurb": "Dog Rocks are a coherent Rock with a mechanically stable framework meaning no significant mineral particles are released into the pet’s drinking water, in other words, Dog Rocks do not break down or leech anything into the pet’s drinking water. Dog Rocks form a and a in which active components are able to act as a water-purifying agent through ion exchange. For this reason, when placed in water, Dog Rocks will help purify the water by removing some harmful trace elements giving your dog a cleaner source of water." Notice they claim no leeching of anything into the water and basically say that the rock filter the water and that's why they are effective. They also throw in a lot of "sciency" sounding but meaningless terms, at least in this context, like "stable matrix" and "micro porous medium".
If filtration helps stop yellow spots, I'd suggest using a high quality water filter rather than rocks that are just sitting in the water with very little opportunity to filter it.