Yes, it's possible to connect the display, however, you will only be able to output a max resolution of 1920x1200 from your iMac - so, essentially, you're limited to that 24" screen, which runs at 1920x1200 natively.
Basically, you can do it. It'll look like crap. It's an expensive oopsie. Don't try it.