Not quite:
Indiana poet James Whitcomb Riley (1849–1916) may have coined the phrase when he wrote "when I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck."[1][2] The phrase may also have originated much later with Emil Mazey, secretary-treasurer of the United Auto Workers, at a labor meeting in 1946 accusing a person of being a communist.[3]
The term was later popularized in the United States by Richard Cunningham Patterson Jr., United States ambassador to Guatemala during the Cold War in 1950, who used the phrase when he accused the Jacobo Arbenz Guzmán government of being Communist. Patterson explained his reasoning as follows:
Suppose you see a bird walking around in a farm yard. This bird has no label that says 'duck'. But the bird certainly looks like a duck. Also, he goes to the pond and you notice that he swims like a duck. Then he opens his beak and quacks like a duck. Well, by this time you have probably reached the conclusion that the bird is a duck, whether he's wearing a label or not."[4]