When I was living in Spain, I visited a castle with some friends. There were six of us, four guys and two girls, and we split up for a while. Another guy and I met up with the two girls and one of the other guys was missing. We asked where he was and one of the girls said he had gone somewhere, saying something about a horse but she didn’t know what he had meant.
When he returned we asked for clarification and he said, “Oh, I had to see a man about a horse.” The girl still had no idea what he was talking about, so we explained it to her and all had a good laugh.
I recently used that phrase and wondered what its origins are.
I found a site with an explanation
To see a man about a dog (or horse) – “Although in the late nineteenth century, to ‘see a man about a dog’ meant to visit a woman for sexual purposes, it now means to go to the bathroom. It is, of course, a traditional answer to the questions Where are you going or What’s your destination? The variations on these expressions are endless and include: Go see a dog about a horse, go and see a dog about a man, go and shoot a dog, go and feed a dog, go and feed the goldfish, go and mail a letter and go to one’s private office.” From the “The Wordsworth Book of Euphemism” by Judith S. Neaman and Carole G. Silver (Wordsworth Editions, Hertfordshire, 1995).
According to the slang dictionary, to see a man about a dog refers to needing to defecate while seeing a man about a horse refers to urination.