You see it in the old westerns. The horse is tied up outside and the cowboy makes an exit (usually from the brothel) through an upper floor window, lands on the horse and rides off.
So, can this actually be done?
Technically, yes, if the horse is close enough to the window. If the horse is tied up, you would have to somehow reach to untie it before riding off. However, it would take an extremely well trained horse!
Most riding horses, if you tried that trick, would put you in the dirt in short order. It also wouldn't be very good for either your horse or your saddle to land from any height. And, of course, you'd need to be quite the acrobat.
So, if you want to have a character pull this particular stunt, you probably want to lay the groundwork for them having the kind of skill needed, have it be a real emergency (because no horseman wants to injure their horse), and think about whether there are good alternatives. Possible, yes? A good idea, no.