Albert A. Hakim, a partner in "the enterprise" that assisted the Reagan administration's secret arms sales to Iran, has been named a target of the criminal investigation of the affair and should not be forced to produce corporate records bearing on the transactions, his lawyer said yesterday.

Hakim's attorney, Richard Janis, argued at a hearing in the U.S. Court of Appeals here that Hakim could incriminate himself by complying with a federal grand jury subpoena for the records.

Associate independent counsel Paul L. Friedman contended in response that Hakim's Fifth Amendment privilege against self-incrimination did not extend to corporate records and that he is obliged to produce them as the main "guru" of the foreign companies involved.

"He can't come in and say, 'I have a Fifth Amendment privilege' and that's all," Friedman protested. "He is a representative of those corporations. That is sufficient to force him to produce the records."

Hakim, the Iranian-born business partner of retired Air Force major general Richard V. Secord, served as financier and negotiator for many phases of the U.S.-Iran arms-for-hostages schemes.

A naturalized U.S. citizen, Hakim also played a key role in setting up Swiss bank accounts as a repository for the arms sale profits. The money, Hakim said in congressional testimony in June under a limited grant of immunity from prosecution, was intended "primarily to assist the contras and also try to make the so-called enterprise that we had created self-sustaining."

Hakim, who first met Secord in Iran in the 1970s, testified in June that he also set up a secret $200,000 Swiss account as a "death benefit" for the family of Marine Lt. Col. Oliver L. North on the eve of the North's arms-for-hostages mission to Tehran in May 1986. There is still about $8 million in the frozen Swiss accounts he controlled.

Hakim's dispute with independent counsel Lawrence E. Walsh and his assistants involves a subpoena issued early last spring, before he began talking to congressional investigators and turning over bank records and other information to them. Hakim moved to quash the subpoena last April 15, but U.S. District Court Judge Aubrey E. Robinson Jr. rejected the request and held Hakim in contempt last July 30 when he continued to resist.

The case was kept under seal until it was given a limited airing yesterday at the appeals court hearing before Circuit Judges James L. Buckley, Harry T. Edwards and Douglas H. Ginsburg. They took the case under advisement, with Edwards voicing concern over whether the court could assert jurisdiction over foreign corporations on the basis of secret evidence presented to Robinson depicting Hakim as the corporations' agent in the United States.

Janis, Hakim's lawyer, said the case involves "foreign companies that have allegedly undertaken covert activities for the U.S. government." He took the position that it could be incriminating for Hakim even to concede that he was the custodian of the records at issue.

Friedman said that the independent counsels had already met that burden of proof in their sealed submissions to Robinson. What investigators are demanding, he said, are not foreign bank records protected by Swiss secrecy laws, but "telephone logs, corporate records, minutes, that sort of thing." Corporations, he said, have no Fifth Amendment rights.

Independent counsel Walsh said in interviews later in the day that the continuing legal battling was to be expected and was not hampering his investigation. He also confirmed that it is likely that he will seek to question President Reagan in the months ahead.

In another development, another three-judge appellate court panel granted motions by The Washington Post, The Wall Street Journal and Public Citizen to open records sealed in the contempt action against North. The court, however, gave lawyers for North and Walsh 28 days to censor the documents.