The House yesterday voted to relax the controversial ethics-in-government act by approving two changes that supporters said were necessary to keep certain, specialists in government, but which opponents said were a step back from last year's tough law.

The new legislation would soften a provision barring contact between former government officials and their agencies. The provision had been construed as so strict that some officials who planned an eventual return to private life have said they would have to quit before it takes effect July 1 unless the law is changed.

Both House and Senate have passed different versions of the bill and are expected to reach agreement before the deadline.

The 1978 act bars all former high level officials for one year from representing any private party in any matter with his former agency and bars former officials for two years from aiding or assisting in representing a private party "concerning" matters in which he had been involved.

The bill as passed by the Senate and approved by the House Judiciary Committee narrowed the proscribed area by changing "concerning" to "by personal appearance." This would limit the two-year bar to making a public appearance before an agency on a matter in which the former official was "personally and substantially" involved.

On the House floor the bill ran into trouble from members who variously wanted to tighten or loosen it further. But the bill was so narrowly drawn it was impossible to offer meaningful amendments that were germane. To prevent its defeat, sponsors finally went back to the House Rules Committee for a resolution opening it to two softening amendments and one making it tougher.

Rep. Bob Eckhardt (D-Tex.) opposed limiting the two-year ban to personal appearances. This, he said, would let a former government lawyer sit "in a backroom" and write the arguments for others to make before his old agency. Eckhardt's amendment limiting "backroom" work to medical, technical and scientific matters was rejected, 88 to 292.

The House then approved two amendments softening the one-year ban that had been enacted to protect against the "revolving door" problem of government officials leaving for private jobs that could utilize their government experience. Republicans insisted the ban had been written too tightly and Democratic sponsors and the administration finally agreed to two amendments as the price of assuring passage of the bill.

One amendment offered by Rep. Thomas N. Kindness (R-Ohio) exempted from the one-year ban former high officials who go to work for institutions of higher education, medical research and treatment facilities and employes or elected officials in state and local government.

Another Kindness amendment would exempt all executive branch officials below the pay grade GS17 and military people below the rank of general officer from the one-year ban. It would also permit the office of government ethics to exempt from the ban general officers and top Civil Service employes considered too far removed from policymaking to require that they be subject to the prohibition.

The House approved both Kindness amendments by voice vote and passed the bill, 327 to 48.