The update wouldn't appear if the Mac App Store didn't see the app on the Mac. You should always erase the HDD on a used Mac and install the version of OS X that originally shipped on the Mac.
Preparing a 2nd Hand Mac for use -
You need to erase the HDD, reinstall the version of OS X that shipped from the factory on the Mac and then set it up as new with your own Apple ID.
User Linc Davis explains how a new owner can prepare a 2nd hand Mac for their own use.
https://discussions.apple.com/thread/6087156?answerId=25468326022#25468326022
Late 2012 Mac mini, macOS ?; Watch, 38 mm silver AL, Watch OS 2.2.2; iPad Air 2 & iPhone 6+, iOS ?; Apple Airport Express