Iran can do the same thing with the Su-75 Checkmate from Russia technically. Create a local production line in Iran. The engine and avionics can come from Russia, the ejection seat from Russia. And Iran can add their own systems on top in some areas.
Russia designed that plane but its not going to be inducted into the Russian Air Force, just like the JF-17 isn't.
edit:
But to be honest with you, this is probably a mistake for Iran. Iran cannot beat the US and Israel playing the air force vs air force game.
They chose a different path with Ballistic missiles and air defense, and honestly I think thats the right more, its a far bigger deterrent than any air force Iran can manage.
Learn from Iraq's mistakes, you cannot fight a conventional war and expect to win, you have to use out of the box solutions and places that have't been explored or developed. This is paying dividend right now for Iran via missiles and drones, why abandon that.
They do need some planes, but don't get into the air force game where you try to buy hundreds of fighter jets, they will always have the qualitative advantage there and the quantitative advantage. You beat them in different areas. Ballistic missiles are the best example of this strategy.
If Iran is going to buy something, i would say they should get License production of the S-400 and other Russian Air Defense systems. As well as get themselves some Beriev A-100s as well as Electronic warfare, Recon and command and control aircraft. Those are much better in more multiplication.
Invest strongly in Military Satellites as well.