In theory, yes.
However, bare in mind that this only applies for the Pokemon Games, and not for the online battle simulators such as Pokemon Online and Pokemon Showdown!. In games, all you need to do is Sketch the move you want from a Pokemon that can learn it.
On Pokemon Showdown!, there are some moves Smeargle learns which make it too overpowered in the metagame, so they are banned in competitive play. Hope I helped.