The Reagan administration retaliated against Loretta Cornelius, then deputy director of the Office of Personnel Management, for testifying truthfully before Congress by trying to discredit and harass her, a House panel concluded yesterday.

The Government Operations Committee urged President Reagan to offer a "comparable position in another agency to Cornelius, whose competence and performance as an administrator has never been questioned."

Reagan's removal of Cornelius, while his prerogative, raises an "apparent conflict between Congress' right and duty to protect its witnesses from retaliation and the president's authority to remove executive branch officers," said committee member Rep. Barney Frank (D-Mass.).

Dissenting Republicans charged that evidence of retaliation or harassment is "sorely lacking." If Cornelius were "harassed, she should look elsewhere for the culprit, and particularly at those who advised her to continue to drag the thing out," Reps. Howard C. Nielson (R-Utah) and Beau Boulter (R-Tex.) said.

Cornelius refused to resign after the OPM inspector general launched an investigation of her based solely on a story in The Washington Times alleging that she misused OPM personnel and government vehicles. She was cleared of all but a minor infraction.

Cornelius was fired Feb. 5 under pressure from conservatives who blamed her for the downfall of former OPM director Donald Devine. Devine withdrew his bid for reconfirmation to a second term at OPM after damaging Senate testimony from Cornelius last summer.

Cornelius testified that Devine asked her to lie during his reconfirmation hearings. Devine delegated power to run OPM to himself while he was awaiting reconfirmation, without telling Cornelius, who was then the acting director of OPM. She testified that Devine asked her to lie and say she knew about the arrangement.

Cornelius could not be reached last night for comment.

The House committee also concluded that the administration had punished William Hunt, former OPM associate director, for his truthful testimony on the same subject. Hunt was removed in October and has been unable to find another federal job.