All cans are coated with a later of Al (or some other metal i
4got).
The dents are not cause by the rusting. The reason for him/her
saying that is that when a can is dented due to physical damage,
there are chances that the coating might be affected and this might
expose the unprotected metal which will rust and thus poison the
food it contains.
No. They are coated with tin.
When the can is dented, there is a chance that the tin layer may
be get damaged, exposing the steel (not aluminium) underneath to
the ambient air.
The problem is that air-exposed steel rusts even more rapidly
when it is in contact with a less-reactive metal like tin than when
the steel is on its own.
So if the tin can is dented or otherwise damaged in any way, it
is best to avoid buying it.