Prime Minister Margaret Thatcher's government came under sharp criticism today after ordering hefty salary increases for senior public officials at a time when it is taking a hard line in pay disputes with the country's schoolteachers and hospital employes.

In an acrimonious parliamentary session, a number of members of Thatcher's own Conservative Party rose to question her judgment and sense of timing in authorizing raises ranging from 12.2 percent to 46 percent for top civil servants, judges and military officers.

Roy Hattersley, deputy leader of the opposition Labor Party, said the salary increases, announced late yesterday, proved that "the government has one rule for the rich, and another for the rest." Thatcher's "commitment to a divided society," he said, "makes this government increasingly despised throughout the country."

Under the new pay scales, salaries for Cabinet secretaries will rise from $70,000 to about $94,000 by next March. A vice marshal in the Royal Air Force, who currently makes $40,000, will receive about $46,000. Salaries for high court judges will increase from $69,000 to $81,000. Sir Robert Armstrong, head of the civil service, will receive a 46 percent raise to $101,000.

Staff nurses in government-funded hospitals in Britain currently are paid about $8,900 per year and recently negotiated a 9 percent increase effective next March.

The new upper level raises will affect about 2,000 persons and cost about $14 million for a full year. The government justified them on the ground that the public sector must remain competitive with private- sector salaries or risk losing its most capable people due to "low morale."

But the chief negotiator for the National Union of Teachers, with whom the government has argued it cannot afford more than a 6 percent raise, said, "I can assure you that the morale of teachers has declined a lot more than that of top people and will decline even further."

Local school board representatives negotiating with the teachers today jeered the education secretary, Sir Keith Joseph, during a speech in which he said there was no more money to offer school workers.

The public dissension of some Conservative members of Parliament reflected growing discomfort within Thatcher's party over what they describe as her apparent indifference to public opinion during a time of high unemployment and decreasing public services.

Although the Conservatives are not required to stand for national reelection until summer 1988, the party has fared poorly in recent local and parliamentary by-elections. Public opinion polls since the beginning of the year have shown declining approval of Thatcher and her domestic policies.

Aides argue that Thatcher was elected twice, the last time in 1983 with an overwhelming majority, because of her "Iron Lady" image and her willingness to use tough measures to bring the country out of economic malaise.

Any retreat from those policies and image, they say, will do little to alleviate temporary criticism and will undermine progress her government has made at the point where it should begin to show results.

Thatcher's victory, however, was also based largely on the British victory in the Falkland Islands war, and while she gained a large legislative majority in Parliament due to electoral distribution, her party won only 42 percent of the popular vote.

The pay raise announcement came in response to an independent commission appointed by the government. Approval of the increases apparently came after minimal discussion within the Thatcher Cabinet.

The Labor Party opposition demanded an emergency debate and criticized Thatcher for not personally defending the raises. She was meeting with Jordan's King Hussein.