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.
As desperate as this sounds, in comedy, 'likes' and 'views,' 'friends,' and 'retweets' really help. If I've ever helped you, please help me by friending, liking, viewing, and retweeting. It makes others think I have a following...it'll take you a minute or less. If you could, I'd really appreciate it!
A recent set--NSFW audio: https://youtu.be/_dcxcZfD6dg
Mangofy your E46!