As my mouse is as old as my iMac and at times needs several goes to open anything, I feel I ought to replace it before it packs up completely!
What do I need for a 21-inch iMac (mid 2011) with 2.7 GHz Intel core i5 and OS High Sierra? And where do I best get it from?
Just about any mouse will work with your iMac, even most mice that only say that they are for Windows. The built-in MacOS mouse driver will work fine with most mice. However, it won't allow you to use any extra features (extra buttons) that a third party mouse might have.
If you want an really good third party mouse, at a dirt cheap price, I really like this one:
Logitech M310
$13
https://www.walmart.com/ip/Logitech-Full-Size-Wireless-Mouse-Red/350072922?athcpid=350072922
If you opt to pick it up at your local Walmart, shipping is free.
This is an ergonomic wireless, optical mouse with a scroll-wheel and two buttons. It will go for an entire year on only one AA battery!
The one downside to this mouse is that it is wireless, but not Bluetooth. The disadvantage to that is that the mouse's little tiny beaver-tooth RF receiver takes up a USB port in your Mac or in your keyboard or USB hub. The advantage is that RF mice are way more reliable and less finicky than BT mice.
Here is a Macintosh driver for this mouse:
Logitech Control Center for Macintosh® OS X - Logitech Support
If you want an Apple Magic Mouse, you can get one mailorder here for $79:
Apple Magic Mouse 2 Apple MLA02LL/A
$79
https://www.frys.com/product/8650130?site=sr:SEARCH:MAIN_RSLT_PG