You could probably train you cat to go in the morning before you leave, and in the evening after your return. It might take some encouragement and simple repetition to get that schedule down. But...
You have to remember that cats have extremely smaller bladders that humans do, and humans are barely able to hold it for ten hour periods. When they are, it's because of dehydration, which is something you don't want to do to your cat as it causes serious health issues.
Also, humans have the willpower to hold it in to the point where it kills them. Cats, along with other animals, might put forth some effort to hold it in until you return, but ultimately don't care what you think. You'll then have a new problem of having a new spot designated as the place to go instead of the garden.
If you can make it home every four hours to take your cat out to go, then I would say it's possible. Otherwise, the best option is to have a litterbox. That way your cat can go when it needs to, then you can simply clean it when you get back from work.
The only other option would be to either hire someone to let your cat out at certain intervals, or build a ladder outside the window so that your cat can come and go as it pleases.
This would of course require your landlord's approval, and some hefty engineering to make it reach your window.