Saudi Arabia's oil minister, Sheik Ahmed Zaki Yamani, hinted today that his country might raise its oil prices slightly. This followed a late night OPEC bargaining session in which Yamani was barely able to preserve the Saudis' traditional dominant position within the oil cartel.

As the oil ministers of the 13 member states of the Organization of Petroleum Exporting Countries began leaving here after two days of difficult talks, Yamani sounded a lot less definite than he did yesterday about his country's refusal to raise its oil prices.

"I will not raise my price," Yamani had said flatly yesterday, after other OPEC countries agreed on a theoretical new price of $32 a barrel, $4 more than Saudi Arabia now charges.

Today, however, Yamani put it this way:

"Don't be surprised if we don't raise our prices. But I don't rule out the possibility of an increase which is not necessarily $4 -- it could be one dollar or so."

Yamani said Saudi Arabia would "watch the market" and would base its decision on a determination of whether it is the oil companies or the consumers who benefit from Saudi prices.

"If we see the oil companies are making too much profits and the consumers are not benefitting from the cheap Saudi price, we will raise it a little bit, maybe a dollar or two," he added.

Oil industry analysts say the new price adopted by most of the OPEC countries yesterday will add up to two cents to the price of a gallon of gasoline or heating oil in the United States. An increase of $1 or $2 in Saudi prices could add another penny to the gallon cost.

In addition to raising and unifying its prices, OPEC price hawks had also hoped in this meeting to persuade Saudi Arabia to cut its production to tighten the market.

Saudi Arabia has said it will not reduce production now, but several other OPEC delegates insisted they were confident the Saudis would end up both raising prices and lowering production before the next OPEC meeting in September.

The implication was that Yamani somehow gave them this impression privately. But sources who are closest to the Saudi thinking insist that they doubt Yamani was any clearer in private than he has been in public.

It took five hours of extra bargaining last night for the Saudis, who produced a third of OPEC's oil to overcome the resistance of the Iranians, who currently produce one-thirtieth of the oil, to changing a single key word in the conference's final communique.

The Saudis finally won, but the difficulty they encountered symbolized the growing isolation of the only important oil producer that consistently expresses an interest in the economic well-being of the Western world.

The final communique that emerged at 3:30 this morning set $32 as a theoretical ceiling for the price of the oil that serves as the reference for the price of all other grades of petroleum. Added to that was the possibility for producers to charge up to $5 a barrel more for higher quality and proximity to the markets.

It was the word "ceiling" that caused the problems. The original deal that was made called $32 a floor price. That would have placed Saudi Arabia, which is insisting on maintaining its current price of $28 a barrel for now, in the position of being the outsider.

The deal that was eventually made places Iran in that position. Iran's oil, which is a greatly reduced factor in the marketplace because of the state of disorganization of Iran's oilfields and because of the West's boycott of Iranian exports, is being offered at $35 a barrel. That is theoretically $3 more than the new "ceiling" price of $32 set for the nearly identical Arabian light crude produced just across the Persian Gulf in Saudi Arabia.

But no one expects anything but market forces to persuade Iran to lower its prices.

Yamani described the outcome of this latest quarterly OPEC ministers' conference as being "not really an agreement," and his criticisms made it plain that he did not feel he was very closely listened to by most of his 12 colleagues.

Iraq, Qatar and Kuwait announced increases of $2 a barrel from their present levels of about $30, and Venezuela said it would hike prices between $1 and $2, all effective July 1. Only the United Arab Emirates announced that it would not raise its prices.

Yamani said he saw very strong "downward pressures" on prices. He predicted that the oil companies would soon have to start selling off their record-level oil stockpiles because it is costing them $6 a barrel a year to store the crude and they are losing money if the price does not rise more than $6 a year.

Yamani also sounded less categorical than yesterday about refusing to cut back Saudi production from its present 9.5 million barrels a day. While he still maintained that Saudi Arabia would not cut back until there is reunification of prices, he said his country would not maintain its present production forever.

He predicted the total OPEC production would be down to a daily average of 25 million to 26 million barrels a day in the third quarter of this year after having hit 30 million barrels in the first quarter.

The implication was that Saudi Arabia might eventually cut production to meet the targets that OPEC's experts reported to the ministers here would be ideal to eliminate surpluses. This extra oil has been giving the world oil market a flexibility it has rarely enjoyed since prices were quintupled in 1974.

Yamani said his country could easily cut its production to 5 million barrels a day and charge $50 to $60 a barrel. But, he said, "you can imagine," what that would do both to the world economy and to Saudi Arabia's own development projects. "You cannot isolate the interests of Saudi Arabia and the interest of the world," he said.

He indicated that the ministers had decided not to carry out their previous threats to drop the U.S. dollar as the main means of payment for oil. "The latest deterioration in the value of the dollar is relatively small," Yamani said. "The value of the dollar is still on the high side."

Yamani showed continued Saudi determination to try to regain control of the international oil market. The countries that are demandiing cuts in Saudi and Iraqi production, he said, cannot afford to cut back themselves because they would be financially strapped.

If and when market conditions start forcing prices down again in September, he indicated, then the Saudis could reassert their traditionally dominant position through their ability to set prices up or down by providing or withholding that little extra amount that makes the difference between a relaxed or a tight market.