iMac: update OS X from 10.5.8 to 10.6 (and beyond)
When you say…

I remember for sure that the computer was bought around 2009-2010

…do you mean that the iMac was bought brand new (i.e., the newest model available in stores in the 2009-2010 time frame), or did you potentially buy an older model (i.e., from 2007-2008) in the 2009-2010 time frame?
Because you have OS X 10.5.8 (Leopard) currently, and assuming that you never downgraded your OS X, you can narrow down which iMac model you have. Since 10.6 (Snow Leopard) came out in August 2009, and since Unibody iMac [see 1st link in your question] was released in October 2009, it can be assumed that you don't have a Unibody iMac.
Thus, you must have what Wikipedia calls an Aluminum iMac [see 2nd link in your question]. If you are sure you bought it brand new in stores between 2009-2010, it was probably what Wikipedia calls the Early 2009 model.
Even if all of the previous deductions were incorrect, as long as you are 100% certain that the iMac has an aluminum housing (i.e., the outside is gray, and not white), then even in the worst-case scenario in which your iMac is from Mid 2007, you are guaranteed to be able to install OS X 9 (Mavericks).
So rest assured, you can upgrade all the way up to Mavericks if you so desire. I've outlined the steps below.

1. Upgrading from OS X 10.5.8 to 10.6
You can up-grade from 10.5.8 to 10.6 by purchasing the installation DVD for $19.99 (w/ free shipping), then up-date 10.6 to 10.6.8, for free using the Apple Software Update application already installed on your iMac.
2. Upgrading from OS X 10.6.8 to 10.9
Though it goes against Apple tradition, Apple has (thankfully) released 10.9 for free as long as you have the system requirements to run 10.8; a simple Google search will help you determine that. If you do, then download and install it onto your computer.