“Ambiguity, or fallacy of ambiguity, is a word, phrase, or statement which contains more than one meaning. Ambiguous words or statements lead to vagueness and confusion, and shape the basis for instances of unintentional humor.”
Quoted from: https://literarydevices.net/ambiguity/
Examples: My husband gave our son a bath wearing slippers. That was some bark.
Was the son or husband wearing slippers? Bark could refer to a sound or a piece of tree.