I'm not sure what you mean by "overflow". Typically an overflow is something that drains to a sump or tank below the tank it hangs on and they work on gravity, not impellers.
Based on the question I'll assume you have a traditional HOB style filter - what brand/model? This might be necessary to best answer the question.
Most likely it's rattling because it's out of balance. Sometimes it's damage to the magnet itself and if so, this should be easily visible. Sand or other had debris can cause this. Other times I've found it's actually the ends of the impeller. For Whisper and Emperor filters they are rubber fittings that initially fit tight, but over the years the rubber can get hard and shrink a little, leaving a loose fit.
Emperor filters can also make noise if the plastic divider piece for the impeller isn't on securely (the piece that separates the portion of the impeller driving the biowheels from the main impeller portion.