Justice Department officials are wrestling with the issue of granting immunity to a woman who allegedly witnessed White House aide Hamilton Jordan using cocaine in 1977.

Whatever that decision, the new relevation by the woman's lawyer, Irving A. Osser, increases the likelihood that a special prosecutor will have to be named in the case, some department officials concede.

Osser, a Beverly Hills attorney, said in a telephone interview that he has told Justice Department officials that Lana Rawls both bought cocaine for Jordan's group on a West Coast fund-raising trip in 1977 and saw Jordan use the drug.

The allegations increase the seriousness of the FBI investigation of Jordan because Rawls would be the first eyewitness whose motivation could not be easily challenged.

Two indicted owners of New York's Studio 54 disco made the first allegation of cocaine use against Jordan late last month. A preliminary investigation so far has produced contradictory evidence, according to Justice Department sources.

Osser's assertion puts Justice Department officials in a dilemma because he has said he will alow Rawls to testify only if she has immunity from both state and federal prosecution. The legislative history of the special prosecutor provision of the new Ethics in Government Act prohibits granting immunity during the 90-day "preliminary inquiry" called for by the law.

Attorney General Benjamin R. Civiletti must ask a special federal court to appoint a special prosecutor if he cannot conclude that the charge is unsubstantiated.

Osser said, "I understand their problem. They can't neutralize a special prosecutor (by giving immunity). And they can't substantiate the charge without giving immunity to get the evidence. It's a vicious circle."

Jordan consistently has denied using illegal drugs. Members of the White House group who accompanied him on the West Coast trip have denied that Jordan or anyone else in the group used or purchased illegal drugs in Los Angeles.

Philip B. Heymann declined to comment yesterday on the latest developments in the Jordan case. But he said the immunity problem is liable to come up where charges are made against any of the nearly 100 high-ranking government officials covered by the new ethics act.

"It's not obvious to me why there's any objection to immunizing a witness who wants to give testimony against a covered individual," he said. "If we do, we're going against a phrase in the legislative history of the law. If we don't, we're in the position of either ignoring hearsay evidence or turning to a special prosecutor with the prospect of substantial damage to a person's reputation."

Department officials said a decision on immunity for Rawls would be made in the next several days. The latest charge against Jordan arose during the investigation of the allegations by Studio 54 owners Steve Rubell and Ian Schrager.

Osser said that he was not certain of the chronology of events in which Rawls, former wife of singer Lou Rawls, allegedly witnessed Jordan's use of cocaine. "I only have a very fragmented story," he said. Osser said his client declined to answer questions last week from FBI agents in Houston, where she lives. After conferring with her by phone, he told Justice Department officials what she would be willing to say if given immunity, he said.

Osser said his client was with Jordan's group at a Beverly Hills night spot called Sergio's and later at a party at the Century Plaza Hotel on Friday, Oct. 21, 1977. He said she bought cocaine for the group that night for $500 supplied by an unidentified member of the Jordan party.

Political pollster Patrick Caddell, then-White House aide Tim Kraft, who is now Carter's reelection campaign manager, and Jordan's friend John Golden were among the group, according to sources. The next night after a Democratic National Committee fund-raiser at the hotel, Rawls joined the Jordan group at the home of Los Angeles businessmen Leopold S. Wyler, Osser said. Wyler told The Washington Post last week that he felt drugs were used at the party because people kept asking him if he "wanted a hit." But he said he did not witness Jordan or anyone else using cocaine.