The U.S. Court of Appeals here yesterday gave more than 20,000 government job appointees a second chance to prove they were illegally denied federal employment as part of President Reagan's hiring freeze last January, saying the president alone lacked authority to revoke their appointments.

The appeals court, in a unanimous opinion, told the federal government it had "played hide-and-seek with job-seekers" by abruptly rescinding work commitments with "apparent . . . indifference to the consequences of its actions . . . ." The court ordered the government to go back to court and show that the jobs were revoked by authorized officials within each agency.

While the decision stopped short of guaranteeing that any of the appointees would get jobs, it gave them a new opportunity to challenge the job revocation procedures and also seek money damages from the government because they had relied on a promise of federal employment.

Government lawyers said late yesterday, however, they believe no more than two dozen appointees out of the thousands whose jobs were rescinded would be able to demonstrate that their jobs were illegally revoked. The vast majority of the appointees either received proper revocation letters or telephone calls before they reported for work -- a procedure that government lawyers contend complies with the standards set down by the appeals court yesterday.

Attorneys for the appointees did not agree.

"I don't think the door was slammed conclusively on anybody," said Joseph B. Scott, one of the lawyers.

The court decision, which could tie up the federal government in a mass of new litigation, affects about 20,000 appointees who had received job commitment letters from the federal government between Reagan's election Nov. 4 and his inauguration Jan. 20.

Last February, U.S. District Court Judge Charles R. Richey ruled that those persons had merely received "offers" for federal jobs, not official appointments, and upheld Reagan's authority to withdraw those offers as part of his broad power over the nation's civil service work force.

The appeals court yesterday, however, dismissed as a "fiction" the government's main argument that the job seekers had no appointments because they had not completed certain standard government personnel forms, a procedure the court described as nothing more than a "ministerial act."

In fact, the court said, all the job seekers had received letters saying they were unconditionally selected for employment, told to report to work on certain dates and "appointed" to those jobs.

Judge Edward A. Tamm, writing the opinion for the court, cautioned, however, that this still does not automatically entitle them to court relief.

"It remains to be decided whether those appointments were capable of being revoked, and if so, whether they were in fact revoked," Tamm said in a 29-page opinion in which he was joined by Chief Judge Spottswood W. Robinson III and Judge Abner J. Mikva.

The power to remove an appointee from such a job lies only with the government officer who actually made that appointment, the appeals court said. For example, the court noted, an appointment authorized by the secretary of Defense can be revoked only by him. The president can order the secretary to revoke the appointment, and fire him if he refuses to do so, "but the president cannot revoke the appointment himself," the appeals court said.

What remains to be done in the job freeze case "is to determine whether all of the appointments made in these cases were properly revoked," the court said. "If not, some of them remain in effect."

The court held that a small category of appointees who actually had started work but then lost their jobs in the freeze order, could not have their appointments revoked because they had in fact become federal employes. The court, however, sent the rest of the case back to the trial court level to determine if any other categories of appointees had their job commitments illegally revoked, even though they had not started work.

The court also ruled that the Reagan job freeze may have illegally extended to about 100 jobs in the Veteran's Administration that had been specifically mandated by Congress -- a hiring directive that the appeals court said the president does not have the authority to ignore.

In sending the case back to Judge Richey, the appeals court directed him to examine claims that the freeze violated the Impoundment Control Act of 1974 because it amounted to a refusal to spend funds already appropriated by Congress.

The court action yesterday came in four cases challenging the freeze, initially brought by the National Treasury Employees Union.