Congress can try to prevent abuse of veterans' benefits by restricting the eligibility by educational courses under the GI bill, the Supreme Court ruled yesterday.

The case centered on 1976 legislation requiring the Veterans Administration to enforce a so-called "85-15 requirement" and a "two-year rule."

Under 85-15, the VA must deny benefits to veterans for courses in which federal agencies pay all or part of the expenses of more than 85 per cent of the students. The government theory is that a course enrolling fewer than 15 privately paying students out of 100 may not be legitimate.

Under the two-year rule, the VA must disapprove a veteran's enrollment in a course that has been offered for less than two years by, among others, a commercial educational institution at a branch beyond normal commuting distance from its main classrooms.

The VA can waive either rule in the interest of both government and veterans.

Last June, federal Judge Andrew W. Bogue of South Dakota held that the legislation denies the equal protection of the laws guaranteed by the Constitution. He termed it "overkill" that would eliminate fraud and waste "at the cost of eliminating quality educational opportunities for veterans."

The Supreme Court reversed 8 to 1, saying that the legislations, based on experience with programs offered to World War II GIs, was an appropriate exercise of Congress' "judgment as to how best to combat abuses . . ." Justice Thurgood Marshall wanted to hear argument in the case.

The case involved the National College of Business, based in Rapid City S.D., which says it invested at least $680,000 in courses designed mainly for veterans. Veterans' enrollment in most of its courses exceed 85 per cent.

Judge Bogue said 85-15 imposed an "obnoxious" double standard.In calculating the 85 per cent recipients of all federal education benefits are lumped together, he said. But in approving courses, "the drawing of class lines suddenly changes; then veterans stand alone to be cut off from benefit."

The Supreme Court said his "error" was in failing to defer to the judgment of Congress as to how to treat the situation.

In a friend-of-the-court brief, the Association of Independent Colleges and Schools, composed of about 500 private business schools, said the two-year rule violates freedom of expression and association.

The court took other actions: "BUT FOR" RULE

The court let stand the 2nd U.S. Circuit Court of Appeal "but for" rule. The rule allows the introduction into evidence of the fruits of an arrest made in violation of the Constitution when the trial judge can envision circumstances in which the unconstitutional arrest could have been constitutional. Justice Byron R. White, joined by Justice William J. Brennan Jr., dissented. Prison Beards

The court let stand a Kansas Supreme Court ruling preventing prison authorities from enforcing a no-beard rule against prisoners whose religion - in this case, Sikh Dharma - requires body hair to be kept "long, intact and natural." Aged, Blind, Disabled

The court granted a government petition for review of a ruling that the Social Security Administration cannot suspend supplementary benefits to an aged, blind or disabled person who is out of the country 30 or more days. IRS Agents' Immunity

The court let stand a decision immunizing from a damage suit an Internal Revenue Service agent who, on the erroneous advice of an IRS regional counsel, made an unconstitutional search and seizure at a taxpayer's premises. PROSECUTORIAL ABUSE

In a gang-rape case in which the prosecutor repeatedly called the jury's attention to the silence of two defendants, the Kentucky Supreme Court held that the abuse of their protection against self-incrimination was "inexcusable" - but "harmless" error nonetheless. Federal courts, however, held the error fatally harmful to the prosecution, and the Supreme Court let this holding stand.