The short version is that you’ll basically grow a patch of grass from seed or you’ll roll some sod in a sandbox or similar tray.
Keeping it contained in this way will prevent damage to your balcony and means the grass won’t take over.
Unsurprisingly, the next option is to use fake grass. It’s probably a more straightforward option because, once you’ve laid it, you’re pretty much done with maintenance.
Who knew you could get grass on subscription? Well, you can, and options like Doggie Lawn are ideal for balconies.
In short, they send you a patch of grass every few weeks, which you fit into a tray. Your dog can then use it to go to the bathroom.