The Supreme Court ruled yesterday that the government may severely restrict release of information bearing on national security by employes and former employes, even if no secret material is involved.

In an unsigned opinion with three dissents, the court sanctioned the Central Intelligence Agency's secrecy agreement, under which all agency employes promise to submit anything they ever write for prepublication screening.

The court said that even in the absence of such an agreement, the government may impose restrictions that would otherwise violate the First Amendment's free-speech guarantee.

The case decided yesterday was prompted by former CIA agent Frank Snepp, who in 1978, without CIA screening or approval, published a book about the American evacuation of Saigon. Though the book, "Decent Interval," was said not to contain any classified information, the government sought to confiscate all of Snepp's earnings from it and obtain an order against any further unscreened writings by him.

U.S. District Court Judge Oren Lewis in Alexandria gave the government all it wanted. But the Court of Appeals rejected the trust placed on Snepp's earnings as too harsh a penalty.

The Supreme Court yesterday restored the entire punishment against Snepp, including confiscation of the $115,000 he has earned from the book.

Snepp signed a secrecy agreement that required screening of "any" information, the court said. "Snepp's breach of his explicit obligation to submit his material -- classified or not -- for prepublication clearance has irreparably harmed the United States government," the court said.

A punishment that does not include seizure of the earnings "may well leave the government with no reliable deterrent against similar breaches of security," the court said. "If the agent published unreviewed material in violation" of his trust, the court said, he should be required to "disgorge the benefits of his faithlessness."

The court carried its ruling well beyond the CIA in a footnote, the only place it discussed the First Amendment. Generally, the footnote said, "the government has a compelling interest in protecting both the secrecy of information important to our national security and the appearance of confidentiality so essential to the effective operation of our foreign intelligence service."

Snepp and his American Civil Liberties Union lawyer, Mark Lynch, said they were stunned by the decision.They wondered whether it could also be applied, for example, to Henry Kissinger's recent memoirs or to other similar literary efforts by a wide variety of government employes and former employes.

Justices John Paul Stevens, William COURT, From A1> Brennan and Thurgood Marshall were equally upset in their joint dissent, written by Stevens. He said the court should not have issued such an opinion without hearing oral arguments on the case. None were heard.

The dissent called the majority's opinion an "uninhibited . . . exercise in lawmaking" that disregarded both precedents in law and the First Amendment. "The court seems unaware of the fact that its drastic new remedy has been fashioned to enforce a species of prior restraint on a citizen's right to criticize his government."

In other actions: CITIZENSHIP

The justices agreed to determine whether a 72-year-old man accused of serving as a guard at a Nazi death camp must face deportation. The Justice Department is seeking to deport Feodor Feodorenko, who immigrated from Poland in 1949 and became a U.S. citizen in 1970, on grounds he did not mention his background when he applied for a visa after the war. At issue is whether this was a "material misrepresentation" as defined by law. RACE RELATIONS

The justices let stand lower court rulings that relieved the NAACP of the obligation to pay $1.25 million in damages to a group of Port Gibson, Miss., merchants. The case grew out of a civil rights boycott there.

The court upheld, 6 to 3, a Mississippi redistricting plan for state legislators. The federal government and a group of black Mississippians had argued that it be struck down in favor of one more protective of black voters' rights. Justice Thurgood Marshall, writing for the minority, protested the ruling means "that Negro voters of Mississippi will not yet obtain an apportionment plan which meets the requirements" of federal law. GOVERNMENT IMMUNITY

The court refused to allow the family of a dead Marine to sue the government for damages on the ground that he was recruited illegally.The court let stand lower court rulings that the Marine Corps' conduct in recruiting Lynn McClure, who was killed during a "pugil stick" drill, was not sufficient to create an exception to the doctrine of governmental immunity. n SENTENCING

The court agreed to decide when, if ever, the government may challenge a convicted criminal's sentence as too lenient. At issue in the case of Eugene DiFrancesco, convicted in a Rochester, N.Y., arson case, is the constitutionality of a 1970 law that allows the government to appeal in attempts to increase the sentences of "dangerous special offenders." A U.S. District Court so designated DiFrancesco and sentenced him to 10 years, but when the government appealed that sentence as too short, the 2nd U.S. Circuit Court of Appeals struck down the law as an unconstitutional form of double jeopardy. LIBEL

The court refused to hear an appeal by Copley Press columnist Ralph De-Toledano that sought to block a $1 million libel suit brought by Ralph Nader. DeToledano, in a 1975 column, wrote that material in the Congressional Record demonstrated that Nader falsified and distroted evidence to make his case against the Corvair.