I have an old Trek mountain bike, about 22 years old but still in great shape. I want to replace the original "Avocet" seat with a more comfortable seat. Are bike seats universal so I could buy any one for the bike?
tl;dr: Yes, you can pretty much buy any seat except some rare/expensive racing or classic leather seats.
Explanation: As long as your seat attaches by two parallel rails that are 44mm apart (which is 95% of seats), then you can replace it with another seat that also attaches by the rails. In case you don't do metric, 44mm is just under 1.75 inches measured between the center of the rails. Here's a photo of a seat with standard rails from wikimedia commons:
For example, even bizarre noseless seats use the two parallel rail design, visible here (for the record, these noseless designs make it hard to control your bike, so they aren't advisable, also see comment by Criggie):
If you're keeping the same seatpost, then you would normally keep the old seatpost adapter as that's what changes between different bike models (seatposts vary in diameter and some seatposts are tapered at the top). A slight complication is that some rails are 7mm in diameter, some are 8mm in diameter and so forth. Usually the clamps are flexible enough to accommodate that variation. I think your bike is bog standard so you shouldn't encounter any problem.
The 5% of seats that don't use the 44mm rails include some keirin racing bikes (that use 30mm rails), classic leather seats (like older Brooks) that use four rails, banana seats, children's bike seats, and a few others.
Most bikes use the same rails arrangement, so you're basically sorted. A 22 year-old Trek will very likely have these "normal" rails.
Seat Clamps both clamp styles use the same rails.
Comments on Saddle Selection
Bike saddles are difficult - you may think the spongiest softest one is most comfortable. Its not.
The trick is to measure the distance between your "sit bones" in your backside, and add 20mm. This is the approximate width of your saddle.
There are significant gender differences too. Given your username is Gary, you're probably a bloke. So there's a good chance you have pressure points that should not carry your weight. Men's saddles often have a longer nose, and either a groove/slot up the middle, or a full-on cutout for comfort.
The only time pressure is on your "soft tissues" is when you're head-down and sprinting in an aero posture.
For most blokes a soft saddle does MORE damage than a medium or firm saddle, because the sit-bones sink into the softness and pressure ends up in places it shouldn't. Somewhat like lying your head back onto a soft pillow and your ears get covered/touched.
Saddles are quite hard to shop for too - you can spend silly money and still have something that never quite works. Depending on your location there may be saddle "libraries" that let you check out a saddle for a while, and see how they work for you. Some examples from a quick google:
And further notes on saddle fit https://www.cervelo.com/en/engineering-field-notes/the-four-and-a-half-rules-of-road-saddles
After that comes saddle fit on the bike - you want it flat and roughly centered, but different people need different adjustments. That's a whole new question though.