Legislation to permit 2.6 million federal workers to take active, off duty roles as managers, fund raisers or candidates in partisan political campaigns cleared its first - and easiest - congressional hurdle yesterday.

The House Post Office and Civil Service Committee voted 18 to 7 infavor of the bill by Rep. William Clay (D-Mo.) to remove most of the 38-year-old, no-politics restrictions on the career federal bureaucracy. If passed this year, it would mean that most government secretaries, scientists, postal workers ad administrators could become involved in 1978 partisan races for local, state and federal elections for the first time in nearly four decades.

Committee Democrats voted in a bloc in favor of the Hatch Act changes under the approving eye of a roomful of federal and postal union acaders and AFL-CIO observers who favor expanded political activity by government workers.Only one Republican, Rep. Benjamin A!Gilman (R-N.Y.) voted with the Democratic majority.

Backers hope to get a House vote on the controversial measure sometime next month. They are working to improve their position that - according to one unofficial union straw poll - has the Hatch Act passing the House by a 10-vote margin.

President Carter made a campaign plege to unions that he would sign Hatch act reform legislation that former President Ford vetoed last year. But in recent days, the White House has added some price tags to the Bill, asking on the one hand for expanded on-the-job political freedowm for political appointees, and tight no-political appointees, and tight no-politics controls for 150,000 or more government workers in "sensitive" jobs.

In that respect the committee bucked the White House yesterday by approving an amendment by Rep. Herbert Harris (D-Va.) that would ban on the job politicking by Cabinet officers and other key political aides. The committee rejected another Harris amendment that would have barred members of Congress and other politicians from making recommendations for indiciduals seeking civil service jobs.

The committee also disappointed the White House by approving a watered-down version of a Carter proposal restricting the political activity of designated " sensitive" employees in contract, audit, procurement and law enforcement work.

Instead it would keep the political restrictings only on supervisors and manager who assign workers to those chores. Backers said this should convince the public that federal employees could not use their jobs or duties to coerce or intimidate individuals or businesses for political purposes.

Much of the three-hour debate took place on amendments that were approved or rejected by a handful of Democrates or Repbulicans who voted the proxies of other committee members who were absent until the final vote on the whole bill.

In fact, during most of the meeting there were as many members absent or outside the committee room as there were inside voting. One amendment lost by a 15-to-8 partyline vote with more of the Democrats whose votes were counted absent and with four Republicans out of the room.

The Clay bill, which faces a tough flight on both the House floor and in the Senate, would:

Permit most federal workers now limited to "passive" partisan actions - voting and behind-the-scenes political support - to take the same political roles as other Americans, including state and local government workers who were released from the restrictions two years ago.

Give the Civil Service Commission the authority, under guidelines laid down in the Clay bill, to determine which federal employees, types of jobs or federal agencies may be excluded from taking active political roles.

The committee rejected a Republican attempt to require that federal workers running as political candidates take 90-day leaves of absence (without pay) before primaries or general elections in which they are involved. Instead, it said that employee may take leave without pay if they wish to campaign, or take vacation (annual leave) for politicking.

Committee Democrats were stunned by a letter from Common Cause, the citizens lobby, delivered just before the vote, arguing against major changes in the Hatch Act. Now both sides are gearing up for what could be the toughest congressional fight since the common-site picketing bill, whihc suffered a suprise defeat last month.