La dama y el vagabundo
The motif also occurs, with a happy ending, in the Disney film "Lady and the Tramp" (1955).