President Reagan commemorated St. Patrick's Day yesterday with a statement that seemed to put the United States forward as a possible mediator in the bitter and bloody Northern Ireland fighting.

"I add my personal prayers and the good offices of the United States to those Irish -- and indeed to all world citizens -- who wish fervently for peace and victory over those who sow fear and terror," Reagan said.

In diplomatic language, an offer of "good offices" means a bid to mediate or somehow play a role in bringing two parties together.

That, however, apparently is not what Reagan had in mind. White House deputy press secretary Larry Speakes said the president's statement is "not necessarily" a precursor to any action.

"He's speaking out against terrorism which he will continue to do," Speakes replied when asked to explain what the president meant.

Any intervention in Northern Ireland would likely be viewed by London as an intrusion in Britain's internal affairs. Northern Ireland is a province of Britain and is governed from London.

In his St. Patrick's Day message, Reagan also warned Americans against contributing aid that could end up "in the hands of those who perpetuate violence, either directly or indirectly." There have been efforts to raise funds from Irish-Americans to support the warring factions.

Reagan, who wore a green-and-white carnation in his lapel for a luncheon visit to the Irish Embassy said that he is proud of his Irish ancestry and that the United States will continue to condemn all acts of terrorism and violence in Northern Ireland.

He presented the Irish Embassy with a jar of green jellybeans.

In the afternoon, Reagan met in the Oval Office with Roberto Viola, president-designate of Argentina. The Reagan administration is reviewing U.S. policy toward Argentina and already has made clear that the review will result in closer relations than in the Carter administration when U.S. criticism of human rights abuses strained ties.

White House officials were less willing than usual to provide details about the meeting. Speakers refused to say whether the recent arrests of human rights activists would be discussed at the meeting.

One subject that seemed certain to be mentioned is the 1978 embargo against arms sales to Argentina. The administration is expected to ask Congress to lift the embargo.

Viola also planned to see Secretary of State of Defense Caspar W. Weinberger during his three-day visit.