Logical fallacy

Equivocation

Shifts the meaning of a repeated term or phrase at a point where the inference depends on keeping its meaning fixed.

A feather on a scale beside a beam of light from a prism

Examples

The train is light enough to move. Light travels very fast. Therefore the train travels very fast.
“Light” means low weight in the premise and electromagnetic radiation in the comparison. Only the spelling carries across.
The bank holds our savings. A bank can erode after a flood, so our savings are threatened by erosion.
The bank is by the river. I deposit my wages at a bank. Therefore I deposit my wages by the river.

A similar case that can be sound

An author uses bank in two senses and explicitly distinguishes them before making an inference.