I'm using LR5 installed on a macbook pro retina 13" early 2015 running Mojave 10.14.6. No problems altho I had an issue yesterday uploading from LR to Flickr. It may have been a setting I changed earlier though.
You can check the system requirements for the latest versions of Lightroom Classic and Lightroom (cloud) at the link below. If your iMac can run the macOS required for the latest versions, you would be able to install the applications and use them.
With old versions, there is no limit to the compatibility for future operating systems and the applications may be used unless something very drastic is changed by Microsoft or Apple. Older (discontinued) application versions are not tested with the latest operating systems.