MacBook Air + iMac + external display
Short Answer

Yes, but you need a USB display adapter (any DisplayLink adapter, like this one should do) for your MacBook Air, the iMac can’t do passthrough.

Longer Answer

The 2009 iMacs don’t have Thunderbolt, only mini-Displayport. Even the later iMacs with Thunderbolt can’t do passthrough with their second Thunderbolt ports. Therefore you need a second display connection on the source Mac. Since the MBA only has one, you’ll need to use a USB-based adapter. There are many options, pretty much all of them using the DisplayLink technology. It works well for 2D stuff, but don’t expect to do any gaming or other 3D work on it.