Logical fallacy
Equivocation
Shifts the meaning of a repeated term or phrase at a point where the inference depends on keeping its meaning fixed.
Examples
The train is light enough to move. Light travels very fast. Therefore the train travels very fast.
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.