Iran today announced a $2 a barrel increase in the price of its crude oil despite signs of an emerging oil glut on the world market.

The announcement by Oil Minister Ali Akbar Moinfar puzzled oil specialists who contend that Iran may be pricing itself out of the world market.

["I cannot really talk on behalf of Iran, but I think the market is now coming down and I don't see a reason for an increase," Saudi Arabian Oil Minister Ahmed Zaki Yamani said in Canada, where he is on an offcial visit. Earlier this week Yamani said his country would maintain its oil production at 9.5 million barrels a day for at least another quarter, an action expected to restrain price increases.]

However, Moinfar is scheduled fly to Libya Friday for meetings with oil officials about a possible Iranian effort to organize generalized production cuts within the Organization of Petroleum Exporting Countries. A significant lowering of OPEC production could put new upward pressure on prices.

Oil sources here believe Iranian exports already have slid during the past three weeks to less than 750,000 barrels a day -- down from a prerevolutionary average of nearly 5 million barrels a day -- despite government denials.

Production levels aside, Iran may have more trouble than some North African producers in making its price increae stick because its crudes are competitive with abundant Saudi and other Persian Gulf oil.

President Abol Hassan Bani-Sadr has made no secret of his desire to reduce oil exports -- and eventually end them. Central bank governor Ali Reza, Nobari recently said Iran had foreign exchange reserves of $10 billion, not counting about $5 billion frozen by the United States in retaliation for the continuing occupation of the U.S. Embassy here.

Officially, Iran insists that it cannot spend all the money it is earning.

The so-called "rich revolution" in Iran has eliminated ousted shah Mohammad Reza Pahlavi's massive prestige expenditure on Western arms and nuclear power plants, cut back luxury imports and generally trimmed its sails in keeping with its "small-is-beautiful" philosophy.

Such is the economic disorder in the country that little money is being spent on even those projects that the revolutionary authorities favor, such as housing and agriculture.

Faced with more than 2 million unemployed, 40 percent inflation and growing discontent, the regime can ill afford any miscalculation on oil, which traditionally accounts for two-thirds of the state budget.

If Iran were unable to sell its oil, it would have to begin drawing on its foreign exchange reserves to pay current government expenses, most of which go to civil servants' salaries.

Ever since the late 1978 oil strikes that spearheaded the Iranian revolution, Iran has become an agressive advocate of higher prices and decreased production.

Before today's announcement, the price for Iranian light crude was $31 a barrel, to which a $1.50 average per barrel surcharge had been added.

The new price of $34.50 would put Iranian crude in the middle range of prices in the slackening world market.

The apparent Iranian answer to the question of who would buy such high-priced crude is that its National Iranian Oil Co. has long-term contracts for about 800,000 barrels a day -- principally with British Petroleum, Royal Dutch Shell and Japanese and West German clients.

Those contracts now usually run six to nine months, and customers are obliged to pay whatever Iran decides is the price.

However, Iran appears less well placed to secure second quarter contracts starting April 1 -- especially at the new rate.

Iran has reduced production gradually since resuming it at about 4 million barrels a day a year ago after the long revolutionary strikes.

Only two weeks ago, Moinfar announced production of 2.7 million barrels a day, of which, after subtraction domestic consumption, roughly 2 million barrels a day is available for export.

But since revolutionary Iran does not publish weekly production figures, many of the Moinfar's claims are subject to caution.

Even if Iran were in trouble, past experience indicates that the revolutionary authorities would be loath to admit any price decrease in public. rSince the revolution, Iran has made a fetish of cutting production, forcing ever-higher prices out of customers and agressively denouncing the industrialized world's past sins.

Moinfar today boasted that the $2 a barrel increases would bring in an additional $2 billion annually, which he described as a "present to Iranians" for their recently celebrated new year.

But if sales continue at present low levels, Iran will have trouble equaling the $21 billion earned during the just completed March 1979 to March 1980 Iranian year.

In other developments today, Adib Daoudi, a Syrian member of the U.N. commission that visited Iran earlier this month, told a Lebanese newspaper that the shah's flight to Egypt will have "adverse effects" on the fate of the American hostages.He added that the panel still hopes to return to Iran and see the captives.

In the troubled region of Kurdistan, meanwhile, at least 20 persons were reported killed in fighting between Kurds and government troops near the town of Piranshahr, Kurdish sources said.