Transformation of the 7,000-acre horseshore-shaped atoll of Diego Garcia into a full-scale American naval base as part of the U.S. military buildup in the Indian Ocean has provoked constrasting reactions from two nearby island-nations.

The views of Mauritian Prime Minister Seewoosaugur Ramgoolam and Madagascan President Didier Ratsiraka, expressed in recent interviews in their countries, are an illustration of the divisions that impinged the unity of the nonaligned states at their recent conference in New Delhi.

They may also be a preview of how discussions will go when a proposed United Nations conference is held later this year in Colombo to discuss the rather quixotic concept of making the Indian Ocean a "zone of peace."

"Bases for me are exactly contrary to peace," said Ratsiraka who has proposed a follow-up conference to the Colombo meeting in Madagascar sometimes in 1982."You can't say on one hand we want the Indian Ocean to be a zone of peace and at the same time construct new bases costing millions of dollars like at Diego Garcia. It's contradictory."

"That's why we're asking for the dismantlement of the bases. It happens that the bases are American. If they were Soviet, I would say the same thing. By asking the Americans to dismantle their bases we are at the same time preventing the Soviets from building bases," Ratsiraka said.

Ramgoolam sees its differently. "The American presence on Diego Garcia is justified," he said. "The Soviet Union is making a big, big effort to destabilize the Indian Ocean. . . . My government is engaged to defend and to see that it does not take place."

The American presence on Diego is quite problematical for Ramgoolam at the moment. Though more than 1400 miles away, the islet used to be part of Mauritius when it was a British colony. As part of the agreement leading to Mauritian independence, Ramgoolam agreed to let the British keep Diego Garcia, which in 1967 they leased to the United States for 50 years.

The 80-year-old prime minister is coming into an election campaign in which he is facing an uphill battle against a Marxist opposition demanding the return of Diego Garcia to Mauritius and the departure of the Americans. The appeal for the return of the lost territory may be a vote-getter for the Militant Mauritian Movement, which has a good chance of winning the election anyway.

Ramgoolam has not gone so far as to demand the return of the island, but he says he wants a "new agreement" on Diego Garcia with the United States. "Instead of passing through Great Britain for the agreement the U.S. can directly negotiate with us as a country," Ramgoolam said.

Neither the opposition nor Ramgoolam is likely to get its way. British Prime Minister Margaret Thatcher said Britain would return Diego Garcia only when it was no longer needed for defense of the West. And U.S. officials legalistically say Britian is their landlord so they cannot deal with Mauritius directly. They are, however, encouraging private contractors building the naval facilities on Diego to use Mauritian labor and supplies as much as possible in order to help ease Mauritius' unemployment problem.

Spurred on by the Soviet invasion of Afghanistan, the Iraqi-Iranian war and the turmoil in Iran, the West has enlarged its permanent presence in the ocean. The United States and its NATO allies now have the preponderance of force there if measured in terms of naval bases, ships and facilities.

But the Soviet Union's proximity to the area, especially since its move into Afghanistan, provides it with a considerable logistical advantage in any conflict touching the Persian Gulf.

Both Pentagon and State Department officials say any discussion about creating a "zone of peace" in the Indian Ocean must be done in a larger context and linked to moves on land, namely Afghanistan. "You can't talk about a zone of peace just on a naval level, you must look at the whole area in a no-holds-barred look and at the arms races of countries themselves," explained one Pentagon official.

One official described the Colombo conference as premature because "not enough preparatory work has been done yet for this year."

The United States, which only reluctanly joined the United Nations ad hoc committee planning the Colombo conference, prefers a bilateral approach to the problem. It was holding talks on the Indian Ocean with Moscow in 1977 but they were aborted in April 1978 "because of a lack of good faith by the Soviet Union which embarked on a naval buildup in the Indian Ocean at the time of their shift to Somalia," according to a Pentagon spokesman.

Ratsiraka's attitude toward the U.S. bases and his more narrow understanding of the terms of reference of the "zone of peace" concept are seen in Washington as serving Moscow's interests. But unlike most other countries in the region, Madagascar does not allow any foreign naval vessel into its ports.

When asked whether he really thought much could come of such an idea given the present state of tension between the superpowers, Ratsiraka replied that "it is precisely this tension and crisis which should precipitate such a conference. Why have a peace conference if there is peace? To convince the superpowers we will try, to force them, we cannot."

Ramgoolam, who is twice as old as Ratsiraka, declared: "We, too, agreed that the Indian Ocean should be a zone of peace. But to conclude from that, that we could . . . persuade the two superpowers to dismantle their bases and remove their ships from the Indian Ocean is, I think, just wishful thinking."