In the 1980s, when Iraq was an ally
Be more specific, please.
Iraq was a Soviet client throughout the Cold War, which
prima facie would make this very difficult.
The photos of the Bagram boneyard (where old jets are dumped after being damaged or having parts stripped off) show hardware from the Mikoyan-Gurevich design bureau, mainly MiG-21s, 23s, and 27s. The complete aircraft which, bizarrely, Saddam H had buried were, as the photos clearly show, Mig-25s. And of course the AK series assault rifles and RPG-7s are all of Soviet make or design, as were all Iraqi tanks - postwar T-series (nice designs, too, judging from the ones I've examined, but the tankers have to be unusually short guys to fit inside). All this is one reason that Iraq's neighbor, the Shah, always bought American weapons.
There was, obviously, a minor power realignment and adjustment after the Shah skipped out, as is only natural. The realignment became more urgent after Iraq tried to snip off some Iranian territory, thinking it would be easy while Iran was in political upheaval. I suspect this is the period when Iraq was an "ally" of the US, but just how is never explained. Both were enemies, but one wasn't as big an enemy as the other, partly because only one had US embassy personnel handcuffed to radiators. So how did an "enemy" morph into an "ally" in popular delusion?
I suspect this claim is just one of those imaginary talking points of the BDS camp but am interested in the possibility that there's something to it. I have yet to see an honest exposition of it, though.