Overheating only with AC on and while idling? Could be fan, but I believe it could also be therm or the temp sensor on lower hose. There are a number of 'feeds' to tell therm to open. If yours was an aluminum housing therm, that makes it suspect.
I know the fan should come on for a few seconds when you turn on the AC, just so the car knows it works, but usually it will be off. I don't otherwise know how to test it.
You'd might have some codes stored that would help you diagnose this...find a local with code reader.
Upcoming comedy shows: March 3 at Broadway Comedy Club, NYC, 8 p.m. March 5, Tierney's Tavern, Montclair, NJ, 7:30 p.m. See Facebook for other shows and PM me if you can make one...love to see you there!
Mangofy your E46!