Yes, they do make that ping when the clip ejects when the rifle is empty.
It is, however, ridiculous to think that the enemy is going to hear that sound over a battle unless is a very close encounter. It's likely that the enemy would know that even though one rifle just ran dry, the American soldier is likely to have comrades on his left and right with rounds still left in their Garands. It's no doubt rare to have the entire line need to reload at the same time.
I doubt that this tale is accurate in spite of being passed down for generations.