The future of British Prime Minister James Callaghan's minority Labor Party government could well be at stake Thursday when Scotland and Wales vote on the first limited form of home rule offered them since the two ancient kingdoms were made part of Britain centuries ago.

In Wales, opinion polls show that the Labor government's proposal for an elected Welsh assembly with authority over housing, health, education and other local matters is likely to be overwhelmingly rejected despite an aggressive Labor Party cmpaign for a "yes" vote.

In Scotland, where nationalist sentiment is stronger than in Wales, the polls show a closer race in which a majority seems likely to vote "yes" for the legislative assembly that the Callaghan government has proposed to set up there.

But the "yes" vote in Scotland is not expected to reach the 40 percent of the entire Scottish electorate, including those who do not vote, that is required for automatic creation of the Scottish assembly. If it does not reach 40 percent, the question would then by decided by a vote in the British House of Commons, where Callaghan could lose because of significant opposition to home rule for Scotland within the Labor Party.

The oppostion Conservative Party has opposed Callaghan's home rule plans all along and has mounted surprisingly effective "no" campaigns in Scotland and Wales, traditionally Labor Party strongholds.

If both home rule proposals are voted down, either in Thursday's referendum or later in Parliament, Callaghan stands to lose the support in Commons of 11 Scottish nationalist and three Welsh nationalist members of Parliament. They have helped keep Callaghan's minority government in power by siding with his party on crucial votes.

If Callaghan then lost a vote of confidence in the House of Commons, he would have to call an immediate national election at a time when his party is trailing the Conservatives badly in opinion polls.

Callaghan would rather hold an election in October, near the statutory end of his government's five years in office, when he and the Labor Party are less likely to be blamed for an unpleasant winter of labor disputes and strikes.

Sensing a moment of promising opportunity, Conservative Party leader Margaret Thatcher took a more active role in the referendum campaign yesterday by strongly urging Scottish voters to vote no.

In a message to Scottish Conservatives, she called the Labor government's home rule proposals a "hashed together" recipe for "more politicians, more civil servants and more expense." She said a legislative assembly in Scotland "would only institutionalize conflict" between Edinburgh and London "that threatens the very survival of the United Kingdon."

Thatcher was referring to the dark issue -- the potential threat of the breakup of Britain -- on which many votes may be decided in Scotland.

Ever since Scotland was merged into Great Britain by the Act of Union in 1707, the spectre of nationalism has loomed as forbiddingly as Edinburgh Castle, from where Scottish kings and queens once ruled, high on castle rock above the grey stone buildings of Edinburgh.

"Scottish nationalism is inside all of us," editor Eric B. MacKay of The Scotsman said. "If the vote in the-referendum is 'yes' but the assembly is voted down in Parliament, there will be a backlash in time."

Opinion polls have shown for years that the Scottish people wanted some kind of change, some form of self-government, but did not want to separate from Britain. This sentiment was not taken seriously in London until the Scottish National Party, after years of concerted grass-roots organizing, suddenly won 11 seats in Parliament in the 1974 British elections with 30 percent of the total vote in Scotland.

Britain then was just beginning to exploit the North Sea oil bonanza off the coast of Seotland, and the Scottish Nationalists' wildly successful campaign slogan was, "It's your oil!"

The gains by the Scottish Nationalists -- like those by the Scottish National Party -- Plaid Cymru -- at the same time -- were made at the expense of the Labor Party which then pushed through Parliament the legislation for the elected assemblies that is now being offered to voters in Scotland and Wales.

The plans were designed to offer enough home rule to reduce the appeal of the nationalists without shifting too much power from London to Edinburgh and Cardiff. Neither assembly would be able to raise taxes, and only the assembly in Scotland would be able to pass new laws. Actions by both assemblies would be subject to vetoes in London.

The Scottish Nationlaists, just as their opponents have charged, are not that unhappy about these limitations because they believe the assembly would still provide them with a good vehicle to press for more self-government and, eventually, full independence.

It is apparently this threat plus uncertainty about the complicated technicalities of the assembly's operation and its effect on taxes industry and local government in Scotland, that have been used by the Conservativeled "no" campaign to make large gains reflected in opinion polls in recent weeks.

Callaghan and top government ministers have barnstormed Scotland in favor of a "yes" vote but seem to have had little effect. Katy Stevens, the spokeswoman in Edinburgh for the "no" campaign and the Conservative Party in Scotland said, "Scotsmen don't like to be told what to do by Englishmen."

Plaid Cymru leader Gwynfor Evans, who today virtually conceded defeat for the assembly proposal in Wales, said the Welsh nationalists had not yet decided whether they would not go against Callaghan in a vote of confidence.

The assembly proposal in Wales has fallen victim to a backlash of the English-speaking majority there. It fears the assembly would be used by an aggressive Welsh-speaking minority to further the teaching and use of the Welsh language and, ultimately to secede from Britain. Language is not an issue in Scotland where the native Gaelic language is now spoken by only a tiny fraction of the population in remote areas.