Prime Minister Prem Tinsulanond appears to be in a strong position to retain his post, if he still wants it, after dissolving parliament Thursday upon the defeat of a controversial government-sponsored decree, political analysts said.

The developments on the often byzantine Thai political scene were not expected to affect the visit of First Lady Nancy Reagan, who arrived tonight from Malaysia on a tour to promote antinarcotics programs. Prem is scheduled to host a luncheon for Mrs. Reagan Sunday.

The dissolution of the lower house of parliament on Thursday, the opening day of the 1986 legislative session, came as progovernment and opposition members of parliament traded charges of vote buying over the controversial decree, which would have increased registration fees for vehicles powered by diesel fuel and liquefied natural gas.

Diplomatic sources said that about 14 legislators of a party in Prem's governing coalition were paid to oppose the bill. It was eventually defeated, 147 to 143.

Under parliamentary practice here, the defeat gave Prem the option of resigning or dissolving the legislature and calling new elections. Political analysts said he surprised his opponents by choosing the latter option and obtaining a speedy decree from King Bhumibol Adulyadej officially dissolving the House of Representatives, the elected lower house of the National Assembly, within hours of the vote. New elections for a 347-seat House were called for July 27. The Senate, the appointed upper house, was not formally dissolved but was adjourned until after the elections.

Aside from the bribery allegedly involved in the voting, the developments showed that the Thai parliamentary system generally is working, Thai and western analysts said.

"The dissolution was consistent with the parliamentary system," said a western diplomat. "It was an indication, albeit a small one, of a maturing political system struggling toward a more democratic regime."

He added that "it is not news" that a Thai member of parliament "would sell his vote, although there has been less of that in recent years."

The elections are likely to result in another coalition, with no single party gaining enough seats for a workable majority, political analysts said. In these circumstances, Prem currently is considered more likely to be returned as prime minister than any other political figure, they said.

However, the Bangkok World newspaper reported today that Prem has told advisers he was tired of politics and would not run for election or accept the post of prime minister if it were offered to him. The unconfirmed report quoted a close political adviser who was not identified.

A retired Army general who so far has avoided joining any of Thailand's score of political parties, Prem retains the confidence of the king, has support within the military and is broadly acceptable to politicians, the analysts said. Although Thailand has a constitutional monarchy, the royal family wields great influence over political developments, and the backing of the king is considered a vital factor in choosing the prime minister.

According to diplomatic sources, among the opponents of Prem operating behind the scenes in the parliamentary maneuvering was Gen. Arthit Kamlang-ek, the military supreme commander and Army commander in chief. In March, Prem rejected a bid to extend Arthit's tenure beyond the mandatory retirement age for a second time, obliging Arthit to step down when his current extension expires at the end of August.

Arthit has said publicly that he is "confused" about the political situation following the dissolution and has not made up his mind whether to run for a parlimentary seat in the July elections. In the past he has expressed disdain for parliament, which he has described as a forum for useless bickering.