Without knowing the exact model of iMac you have it's not possible to give you a definitive answer. Here's information that will enable you to answer your question, I think.
Upgrading to Snow Leopard, Lion, or Mountain Lion
You can upgrade to Mountain Lion from Lion or directly from Snow Leopard. Mountain Lion can be downloaded from the Mac App Store for $19.99. To access the App Store you must have Snow Leopard 10.6.6 or later installed.
You can purchase Snow Leopard by contacting Customer Service: Contacting Apple for support and service. The price is $19.99 plus tax. You will receive physical media - DVD - by mail.
Third-party sources for Snow Leopard are:
After you install Snow Leopard you will have to download and install the Mac OS X 10.6.8 Update Combo v1.1 to update Snow Leopard to 10.6.8 and give you access to the App Store.
You can purchase Lion by contacting Customer Service: Contacting Apple for support and service. The cost is $19.99 (as it was before) plus tax. It's a download.
Be sure your computer meets the minimum requirements:
Macs that can be upgraded to OS X Mountain Lion
1. iMac (Mid 2007 or newer)
2. MacBook (Late 2008 Aluminum, or Early 2009 or newer)
3. MacBook Pro (Mid/Late 2007 or newer)
4. MacBook Air (Late 2008 or newer)
5. Mac mini (Early 2009 or newer)
6. Mac Pro (Early 2008 or newer)
7. Xserve (Early 2009)
Are my applications compatible?
Am I eligible for the free upgrade?
For a complete How-To introduction from Apple see Apple - Upgrade your Mac to OS X Mountain Lion.
Model Eligibility for Snow Leopard and Lion.
Snow Leopard General requirements
1. Mac computer with an Intel processor
2. 1GB of memory
3. 5GB of available disk space
4. DVD drive for installation
5. Some features require a compatible Internet service provider; fees may apply.
6. Some features require Apple’s MobileMe service; fees and terms apply.
Lion System Requirements
1. Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7, or Xeon processor
2. 2GB of memory
3. OS X v10.6.6 or later (v10.6.8 recommended)
4. 7GB of available space
5. Some features require an Apple ID; terms apply.
There are quite a few Core 2 Duo iMac models. if you open System Profiler in the Utilities folder and report the Model Identifier, then it will be easier to help you further.
As for upgrading to Lion you would not require Snow Leopard were you to first erase the hard drive before installing Lion. Lion will be delivered to you as a downloaded file. Once you install it the file will automatically delete itself, so be sure to note this recommendation. Or you can simply purchase both the Snow Leopard DVD and the Lion installer.
Make Your Own Mountain/Lion Installer
1. After downloading Mountain/Lion you must first save the Install Mac OS X Mountain/
Lion application. After Mountain/Lion downloads DO NOT click on the Install button.
Go to your Applications folder and make a copy of the Mountain/Lion installer. Move
the copy into your Downloads folder. Now you can click on the Install button. You
must do this because the installer deletes itself automatically when it finishes
2. Get a USB flash drive that is at least 8 GBs. Prep this flash drive as follows:
a. Open Disk Utility in your Utilities folder.
b. After DU loads select your flash drive (this is the entry with the mfgr.'s ID and size) from the left
side list. Click on the Partition tab in the DU main window.
c. Under the Volume Scheme heading set the number of partitions from the drop down menu to one.
Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the
partition scheme to GUID then click on the OK button. Click on the Partition button and wait until
the process has completed.
d. Select the volume you just created (this is the sub-entry under the drive entry) from the left side
list. Click on the Erase tab in the DU main window.
e. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the
button for Zero Data and click on OK to return to the Erase window.
f. Click on the Erase button. The format process can take up to an hour depending upon the flash
3. Locate the saved Mountain/Lion installer in your Downloads folder. CTRL- or RIGHT-click on the installer and select Show Package Contents from the contextual menu. Double-click on the Contents folder to open it. Double-click on the SharedSupport folder. In this folder you will see a disc image named InstallESD.dmg.
4. Plug in your freshly prepared USB flash drive. You are going to clone the content of the InstallESD.dmg disc image to the flash drive as follows:
a. Double-click on the InstallESD.dmg file to mount it on your Desktop.
b. Open Disk Utility.
c. Select the USB flash drive from the left side list.
d. Click on the Restore tab in the DU main window.
e. Select the USB flash drive volume from the left side list and drag it to the Destination entry field.
f. Drag the mounted disc icon from the Desktop into the Source entry field.
g. Double-check you got it right, then click on the Restore button.
When the clone is completed you have a fully bootable installer that you can use without having to re-download Mountain/Lion.
Note: The term Mountain/Lion used above means Lion or Mountain Lion.
As an alternative to the above you can try using Lion DiskMaker 2.0 that automates the process.
I remembered that I had purchased SnowLeopard some time ago. So I installed it, upgraded to 10.6.8 and then downloaded Lion from the App Store.
Now I have another problem, I can't log in...
(See my most recent discussion: https://discussions.apple.com/message/20088775#20088775)