Can the fan in an iMac (model 5,1 "Late 2006") be replaced?
I don't know about replacing the fan, but with XRG you can monitor your system's temperatures on screen.  smcFanControl lets you tweak your fan speeds; maybe you can use it to dislodge whatever's in there, before you try opening the box.