Can a book stored in Kindle be saved as a file on my iMac. Would like to open in Calibre I bought a Kindle version of a reference book from Amazon. The Kindle reader for the iMac is not my favorite application and I would like to load the book in Calibre and possibly save as a PDF. Or just read it using Calibre. Does anyone know if this is possible?
In a word yes.

you can connect your Kindle to your Mac and browse through the filesystem and find the books folder and copy the files out.

I have found, however, that the files stored on the Kindle itself are kind of similar to a macOS package format. EG a folder full of files. Rather than deal with that I just logged onto my Amazon account, went to my Kindle purchases and selected a book I want to download. Books being rather small things as downloads go they come across quickly.

And then you have an ".azw" file which is got Amazon's DRM on it. Which means you can only read it on a Kindle signed in to your Amazon account or a Kindle app on another device that is signed in to your Amazon Account.

That can be bypassed, but is beyond the scope of what we can do on AskDifferent. But if you want a hint, google for something like remove DRM from azw files with Calibre. It's not simple but once set up you don't even have to think about it.