A pony will likely look disproportionately small for you, even if you are physically an okay size / weight to ride it. The actual shape / body type of the horse makes a big difference. For example, if the horse is big-barreled / wide, you will be able to ride a shorter horse than if they were a thin build like a Thoroughbred. Pay attention to the point on the horse that your leg extends to lengthwise. If your foot is below the horse's belly when you are in a normal stirrup length, they are absolutely too small for you.
It's not so much about height, as about weight. As Alannah said, 20% is the rule. I'm taller and I ride two 13.2hh ponies, but I'm very light. However, I don't jump them much, or compete them at all as despite being light enough, I will distort their balance just from towering over them. If I were to buy a horse, I'd be looking at 16hh as a minimum.
I’m 5’9 and I hide a 16.9hh horse, honestly I don’t like riding smaller horses and ponies because my legs feel too long for them (like they hit too low). It also depends on each individual horse and rider, try a few and see what makes you comfortable!
I’m about your height, a little bit shorter, but only about an inch. There are ponies that will be able to carry you just fine, you will just look too big for them. My horse is 15.2 hands and we look fine together. I wouldn’t say there is a certain height that you wouldn’t be able to ride (obviously excluding minis and ponies that are not supposed to be ridden in the first place), it’s more about how much the horse will physically be able to hold and still go comfortably. It may just look a little disproportionate if you ride a small pony, but if they can carry you comfortably then it should be fine.
A tip: generally, if you weigh more than 20% of the horses weight you shouldn’t be riding it. Of course this is different for every horse, but you can use it as a general rule
I would say a pony is too small, the hight of a horse depends also on their build and your body proportions, but something around 16hh and up is probably okay