El Capitan supports Macs going back to 2008 so you should be fine for a while.
As for upgrading your existing iMac, that's not so simple. Many Macs from about that era had their RAM soldered on, for example, so even that couldn't be updated. And flash/hard drives often used proprietary connectors. You can see if there's anything in this article that helps you with upgrading though: click here
My advice would be that if you do upgrade your iMac you can just purchase a SuperDrive separately. That will give you the CD/DVD drive you are looking for and costs around £60.