A large corporation and a major union argued in the Supreme Court yesterday that the law allows them to agree on a "voluntary" plan to overcome racial imbalance in the workforce by discriminating - temporarily - against some whites.

Joined by the federal government, Kaiser Aluminum & Chemical Corp. and the United Steelworkers of America, AFL-CIO, made that argument at a hearing on the most important case of the court's term-one that potentially affects millions of workers.

The case could be more important than the medical school quota case of Alan P. Bakke. That case, however, was decided last June on the basis of the equal protection guarantee in the Constitution, not on the basis of the news case: the Civil Rights Act of 1964.

That law leads to a different bottom line than the government's, the company's and the union's, argued opposing lawyer Michael R. Fontham. As he saw it, the law barred a Kaiser-USW plan that opened in-plant craft training programs to whites and minorities on a one-to-one basis.

The result of this affirmative action was so-called "reverse discrimination" against his client, Brian F. Weber, and other whites at the Kaiser plant in Gramercy, La., Fontham argued.

Simply because of their race, they were kept out of the programs while blacks with less seniority got in, the lawyer said. Yet, he emphasized, the plain words of the law's Title VII make it unlawful for an employer to discriminate against "any individual."

His adversaries all disagreed. Even if the plan on its face is violative, they said, the legislative history shows clearly that Congress intended to allow just such a plan as was agreed to not only by Kaiser, but also by the entire aluminum steel and canning industries in negotiations with the union in 1974.

The court devoted an hour and 40 minutes to hearing the argument.

Despite last night's chill, several persons arrived at the marble steps of the court building well before dawn.

All told, 289 members of the public were admitted to hear at least parts of the agrument, while about 100 more were turned away. Three rows of chairs were added to the press area to accommodate 80 reporters. The court does not allow its proceedings to be broadcast.

Weber, a 32-year-old laboratory analyst who started the case by filing a lawsuit-and winning in a trial court and the 5th U.S. Circuit Court of Appeals-heard the argument. "I'm pleased with it," he told reporters afterward. "I'm satisfied. I enjoyed it, I thought it was good."

The court may decide the case by early July. Justice Lewis F. Powell Jr., who is recovering from surgery, was not on the bench but could listen to tapes of the argument at home. Justice John Paul Stevens, for unstated reasons, is not participating.

Justice Potter Stewart indicated impatience wth the avoidance of such plain words as "quota" in favor of phrases such as "reasonable race-conscious steps," to cite one in a government brief.

Protesting that the more than 30 briefs in the case were "sprinkled with euphemisms," he said that the court will decide it "not on the basis of what it is called, but what it is." What it is, he made clear, is a question of the legality of a voluntary plan that, to correct a racial imbalance, lets an emplyer "discriminate against some white people."

Stewart also was impatient with an argument made for the government by Deputy Solicitor General Lawrence G. Wallace. The agrument was that a company and a union can adopt quotas only as a "remedy" for real or "apparent" past discrimintion.

Stewart said, however, that it would be "wrong" for the court to reach that issue, because all it must decide is whether the Kaiser-USW plan was a gross violation of Title VII, as claimed by Weber, or no violation at all, as claimed by the union.

Kaiser's lawyer, Noyes Thompson Powers, had a different concept than Wallace's. Private parties, he said, may adopt a quota to deal with identifiable discrimination that may be "external" to the workplace-meaning that it originates in a pattern of segregation such as pervaded Louisiana-but which is reflected in the composition of the workforce.

For the USW, Michael H. Gottesman rejected both approaches, saying that they could jeopardize affirmative action plans negotiated by his union with employers in all the industries with which it deals.

His position is that employers and unions were free to negotiate such plans before Congress enacted Title VII, that Congress did nothing to diminish this freedom in 1964, and that it deliberately intended to minimize governmental intrusions by leaving such matters to private employers and unions.

Repeatedly, Chief Justice Warren E. Burger asked the government, company and union lawyers why, if Congress had intended to permit a plan such as Kaiser's, it had not said so explicity?

Gottesman, while acknowledging that there were some contradictons and ambiguities in the legislative history, said the history shows overwhelmingly that Congress wanted to leave the matter "in private hands."

Justice Byron R. White, in an exchange with Weber's lawyer, asked Fontham if his position could be formulated this way: "you can't avoid discrimination by discriminating."

Yes, your honor," Fontham replied emphatically.

He contended that the plan set up a two-track seniority system to replace the previous plantwide seniority system and thus discriminated against unskilled whites, such as Weber, who otherwise would have qualified for the in-plant craft training programs.

But Kaiser's Powers said that the programs are to the advantage of whites as well as blacks because they create new opportunities. Previously, he explained, craftsmen, rather than being trained, were hired entirely from the outside.

In reply to questions by Justice Harry A. Blackmun and others, Powers said the company did not admit discrimination against blacks, who had less than 2 percent of the craft jobs in the Gramercy plant while constituting 39 percent of the workforce in the community and 46 percent of its population.

Instead, Powers said, the company acknowledged that unless it took affirmative action it could be liable to lawsuits brought by minorities and women.

Fontham made some claims that the justice shot down. For example, he claimed that 1976 opinion for the court was intended to assure equal rights for all individuals rather than for a class. But the author of the opinion, Justice Thurgood Marshall, pointed out that it said plainly that the court was not dealing with affirmative action.

Also in an exchange with Marshall, Gottesman emphasized that unlike craft unions cited by Chief Justice Burger, the USW was begun with black members and, in the South, refused to segregate its members meetings even when that meant that local leaders were "dragged off to jail every month."