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.
Anyway, Hollywood spies do kind of exist - but they aren't the Rosenbergs breakdance fighting on a rooftop. They're active duty military on "loan" to the NSA's Special Collection Service. They rarely return to the military, not because a life of blackbag jobs and no stability is fun, but because the military really doesn't want them after the CIA has potentially screwed them up.
I don't know which intelligence agency they worked for, though; not even which country. I presumed they worked for either the U.S. or Israel; probably the latter given the low-tech, laborious method. The person didn't tell me directly. My boss told me about our visitor's career after they left. I was working at a political advocacy organization that promoted U.S.-Israeli security ties and which regularly worked with people--mostly retired--from the intelligence and defense communities.
This is obviously just a guess... assuming this took place on US soil: it sounds to me like that dude worked for somebody doing something "extra-legal" and it wasn't the USG. Israeli is a pretty big fan of honeytraps and blackmailing intelligence assets. So that is where I'd put my money.
Also: the civilian side of the US intel industry puts almost zero effort into OPSEC. Just search LinkedIn for prior military who list "remote sensing" or whatever the current euphemism is for NSA stingray tender, you'll get a results page full of laughably low effort cutouts.
IIRC, Europe was mentioned. That doesn't necessarily exclude other countries, including the U.S., but this organization had relationships with and members retired from high-ranking government offices, including CIA directors, defense secretaries, Pentagon leadership, etc. IOW, not the kind of place that would consort (at least knowingly and in the office) with people who directly participated in intelligence operations against the U.S. At least until the Trump Administration current and former officials were still rather hostile to the threat of intelligence operations against them.
One day he was ordered to verify a DAP meeting, and actually liked what was told. Someone pissed him of, causing him to start one of his famous angry speeches. The DAP was impressed, offered him a position, and the resulting meteoric rise ultimately started a world war.