I bought what you're looking at new in 2011*; it came with Mac OS X Lion, which I used until the beginning of this year when I upgraded to Mac OS X El Capitan (10.11.6). I upgraded pretty much for the same reason you need to, namely to use the latest version of Firefox — I'm currently running Firefox Quantum (61.0.1).
* iMac 21.5", mid-2011; 2.5GHz Intel Core i5; 4GB 1333MHz DDR3.

No complaints other than my having to replace the hard drive a month after the warranty ran out; it's been fine ever since.

As long as your refurb source is trustworthy (and backs up that trustworthiness in concrete ways), I can't see a problem.