A federal judge dismissed the jury in a sensitive national security case yesterday and told prosecutors they must decide by Monday whether to drop the charges to protect Central Intelligence Agency secrets.

In an action that could deter prosecution of other national security cases, U.S. District Court Judge Aubrey Robinson rejected a Justice Department proposal designed to prevent classified information from being disclosed at the perjury and conspiracy trial of Robert Berrellez, an official of the International Telephone & Telegraph Corp.

Berrellez, 58, is accused of lying to a Senate committee investigating efforts by ITT and the CIA to block the 1970 election of Salvador Allende as president of Chile.

Though Robinson's discussions with attorneys in the case were in secret, it is understood that he told Justice lawyers he will grant a defense motion to dismiss the case unless they can get yesterday's ruling overturned.

Appeals generally are not heard on a judge's decision before a case is finished. The Justice Department could try to get the U.S. Circuit Court of Appeals here to order Robinson to change his ruling, but this so-called mandamus procedure is rare.

The government's concern about protecting national secrets has been a constant threat to the three cases growing out the Senate's 1973 investigation of efforts by ITT and the CIA to influence the election in Chile.

In August, Justice dropped three counts of a companion indictment against Edward J. Gerrity Jr., an ITT senior vice president, rather than run the risk that classified information might be disclosed at his upcoming trial.

Last fall, former CIA director Richard M. Helms was allowed to plead no contest to misdemeanor charges of giving evasive testimony to the Senate because he threatened to disclose secrets in his defense.

A recent Senate Intelligence Committee report on the problems of national security threats to prosecutions referred to the defense tactic as "graymail." In such cases, the defense attorney keeps demanding information from the government until he finds something the prosecutors have decided they can't give up, the report said.

Patrick A. Wall, Berrellez's attorney, had complained in pretrial hearings that the CIA was trying to limit his defense by barring his access to some material.

Justice Department attorneys argued then, as they did again yesterday, that some of what Wall demanded was not relevant to the case against Berrellez and might jeopardize unrelated intelligence sources and methods.

For instance, Wall had asked for CIA documents relating to Hernan Cubillos, a Chilean newspaper official mentioned in the conspiracy count against Berrellez.

Cubillos is now the foreign minister of Chile. On Monday, the day the trial opened, the prosecution quietly dropped references to Cubillos from the charges.

A jury of eigth women and four men was prepared to hear opening statements in the Berrellez case yesterday morning when the judge called opposing attorneys to the bench to continue - out of the jury's hearing - arguments on the prosecution's proposed protective order.

Some of the discussion could be heard by reporters in the courtroom, including offers by Robinson to seal the courtroom during parts of the trial and contentions by prosecutor John Kotelly that some defense requests for evidence were not relevant.

It is understood that the government was seeking permission to be able to challenge Wall's proposed defenses at bench conferences with the judge during the trial before the jury would be allowed to hear certain evidence.

United Press International reported, for instance, that Kotelly had asked Robinson on Monday to prevent witnesses from naming CIA employes, office locations or other intelligence information without court approval.

After the huddle with lawyers yesterday morning, Robinson called the jury back in and announced: "Circumstances have arisen which make it necessary for me to discharge you."

Attorney General Griffin B. Bell said at the time charges were filed against Berrellez and Gerrity in April that "You cannot decide never to prosecute these cases that might involve national security. To do so gives people a license. That just can't be the law."

The problems encountered since then in the Gerrity and Berrellez cases have led some Justice attorneys, however, to wonder whether such prosecutions are ever possible.

The cases also raise questions about the government's ability to prosecute espionage cases, such as the one pending against William Peter Kampiles, a former CIA clerk accused of selling the Soviet Union a supersecret manual on a sophisticated U.S. spy satelllite.

Some Justice Department officials feel that the relevancy of evidence is much clearer in espionage cases than it has been in the troubled cases involving ITT, the CIA and Chile.