Could be a failing water pump (hopefully). My E46 always had a rattle, which I thought was the usual VANOS rattle, but it turns out it was the water pump.
It could also be the AC pulley bearing. Search around. There's a good thread that discusses it, and a great youtube video walking through the replacement.
Edit: Here's the youtube video
https://www.youtube.com/watch?v=5qd0e-vVxQA