Of course there was anesthesia before ether. The difference was that they used drugs and sedatives, mostly opium, henbane, nightshade, and the like. Or whisky, another popular choice. Not super-safe for waking up again, but you’d be asleep and feeling no pain.
Of course, today most operations are carried out with anesthetic drugs, not anesthetic gases. Because the drugs are now safer.
Dwale: an Anaesthetic from Medieval England. Ingredients: bile, hemlock, bryony, lettuce, opium, henbane, vinegar, and a half-gallon of wine. Talks a fair amount about medieval use of “sleeping medicines” and “drowsy syrups,” and why there was trouble getting the dosage right.