The United States has actively intervened in foreign exchange markets in the past few weeks to try to slow the rise of the surging dollar, Treasury Secretary James A. Baker III disclosed yesterday.

The intervention reflects a shift in policy reached last month by financial ministers of the five leading industrial nations. At that Washington meeting, the ministers agreed they would step into the foreign exchange markets "when it would be helpful," rather than just when markets are "disorderly," a condition for intervention that the United States has insisted upon in the past.

When nations intervene in the markets, they sell their currency if it is rising too rapidly, or buy it to prop it up when it is falling.

Baker's disclosure that the United States has been in the market comes at a time when the dollar has been reaching record highs against many of the currencies of European nations, whose governments have criticized the Reagan administration for not acting to halt the dollar's rise. This week the dollar broke through the symbolic barrier of 10 French francs and is slowly moving in the direction of parity with the British pound.

Yesterday, the dollar slipped in value against other currencies. Analysts said the markets were jittery about central bank intervention, with Baker's comments, which were made in a meeting with reporters, feeding those fears.

The decision to intervene resulted from the meeting of finance ministers from the United States, West Germany, Britain, France and Japan on Jan. 17, Baker said. Baker called the agreement then a "moderation of tone" of the intervention guidelines.

But Baker said that reducing the federal budget deficit would be more effective in the long run in slowing the dollar's rise than intervening in foreign exchange markets.

"I think the position is basically that it's our view that intervention is best done and more properly done only in the case of disorderly markets," Baker said. At the Jan. 17 meeting, "we agreed to take a look at it, when to do so would be helpful. That's a rather vague standard. We have done that since then. Without getting into more detail, we have intervened, and we have in fact done so since I've been here."

Baker took office as Treasury secretary on Feb. 3.

Baker was asked whether the interventions had been successful. "I think that there was some effect, so I suppose you'd have to say to that extent they were effective," he said. "But the dollar continued to rise notwithstanding those interventions. What I can't tell you is how much more it would have risen if we had not intervened."

A senior administration official, who declined to have his name used, said, "There's been some intervention in cases not limited to disorderly markets." He declined to specify the new conditions under which intervention would take place, however.

Some foreign exchange analysts yesterday said they had not noticed any disorderliness in the foreign exchange markets, and if the government had intervened, it was done in small doses. Although the dollar has risen dramatically, it has not done so in a disorderly fashion, the analysts said.

Exchange rates are expected to be on the agenda of the Bonn summit of leading Western industrial nations and Japan in May, and French officials have said that Brit- ish Prime Minister Margaret Thatcher has taken the unusual step of asking President Reagan personally for the industrialized countries to take joint action to stop the dollar's rise.

The effect of the rising dollar on the Europeans is somewhat mixed: It makes their exports cheaper, but it can be inflationary because it makes imports more expensive.

The high dollar, however, also makes commodities denominated in dollars, such as oil, more expensive. The dollar price of oil to Western nations is higher in their own currencies now than it was during the height of the oil shocks of the 1970s, economists said. However, for Britain -- an oil exporter -- the dollar's rise has increased its revenue from its North Sea oil production.

On the other hand, the rise of the dollar has also embarrassed the Thatcher administration, which was forced to raise interest rates twice in two weeks to make the pound more competitive with the dollar.