Shall I tell you the secret of the true scholar? It is this: Every man I meet is my master in some point, and in that I learn of him.
Ralph Waldo Emerson (1803-1882) American essayist, lecturer, poet
“Greatness,” Letters and Social Aims (1876)
(Source)
This appears to be the origin of the much more common paraphrase (not found in Emerson's works, but popularized by Dale Carnegie in How to Win Friends and Influence People (1936)): "In my walks, every man I meet is my superior in some way, and in that, I learn from him."