Only in popularizations are the two roles confused - though I suppose there are rare circumstances in which an officer goes undercover in order to directly pilfer secrets, as opposed to recruiting someone who can. Hard and rare one expects: language, culture and competent counter-intel have made recruiting someone already inside easier and wiser.
Also I don’t think competent professional spies have ever used “movie inspired” anything, but the generous interpretation of your comment assumes you meant the reverse.
But still a poor assumption to think the fiction ever got it right, starting with the confusion over what an “agent” is but including everything else.
Excepting Graham Greene’s “Our Man in Havana” and “The Quiet American,” which I suspect nailed the respective damnfool incompetence and arrogant ignorance of a certain type of mid-century patriot keenly. “Harlot’s Ghost,” though mystical, may also speak bizarro truth.