The British government today accepted an offer by the International Committee of the Red Cross to try to mediate an end to the hunger strike by Irish nationalist prisoners in British-ruled Northern Ireland.

Committee members intend to visit the Maze and other prisions in the province and speak with convicted Irish nationalist terrorists "to assess and, if necessary, to make recommendations to improve the conditions of imprisonment," Britain's Northern Ireland secretary, Humphrey yatkins, said in a statement.

An offical of the Northern Ireland Office in Belfast went into the Maze tonight to inform all prisoners of the government's decision. A team of Swiss from the Red Cross committee, based in Geneva, is expected in Belfast Thursday.

Today's move could provide the British government and the hunger strikers a new opportunity for a compromise on the prisoners' demands for changes in clothing, work, group association and other prison rules. Both sides had made significant concessions in a previous mediation effort by lawyers and clargy from an Irish church group before the attempt failed when hunger striker Joe McDonnell died last week. Two of the remaining eight hunger strikers have fasted 55 and 54 days and are said to be weak.

The Irish church group mediators blamed the British government for backing away from concessions it had agreed to shortly before McDonnell became the fifth hunger striker to die. The Irish government then strongly urged Prime Minister Margaret Thatcher's government to explain directly to the prisoners the changes in prison conditions that would be made if the strike ended.

Officials in Dublin said today that the Irish ambassador in Washington, Sean Donlon, personally conveyed to President Reagan yesterday the hope of the Irish government that Reagan would use "his good offices" to persuade Thatcher to deal directly with the prisoners. A White House official said today that a letter had been received from Prime Minister Garret FitzGerald, but he would not reveal its contents.

In the village of Galbally in Northern Ireland today, the body of Martin Hurson, who on Monday became the sixth hunger striker to die, was buried after a Provisional Irish Republican Army military-style funeral. Security forces remained out of sight and made no attempt to arrest the gunmen firing the customary ceremonial volley of shots over the coffin, as they did during the funeral of McDonnell last Friday.

Hurson died unexpectedly on the 45th day of his hunger strike. There has been scattered rioting and shooting attacks on police and Army patrols in Northern Ireland since the deaths of McDonnell and Hurson. A demonstration by about 200 supporters of the hunger strikers briefly closed off Shannon International Airport in the Irish Republic today.

The Provisional IRA, which is committed to ousting the British from Northern Ireland and replacing the present Dublin government in a revolutionary, united Ireland, has released statements in recent days purportedly smuggled out of the Maze in which hunger striker Kieran Doherty and the other prisoner elected to the Irish Parliament last month, Patrick Agnew, have accused the Irish government of not supporting the prisoner' cause. Irish officials fear an emotional and political backlash if Doherty, who today was on his 55th day of hunger strike, dies.

His death, besides probably leading to more demonstrations in the republic, where residents already are fearful that the violence of the north is moving across the border, would create a vacancy in Parliament.The resulting by-election could again be won by a prisoner or by the opposition Fianna Fail party, threatening FitzGerald's slim three-vote margin in Parliament.

Irish officials, who refuse to be named, said all this could be avoided if the British government tried harder to settle the hunger strike.

But top British officials, including Thatcher, have maintained a principle of not dealing directly with the prisoners "under duress" of the protest fast.

British diplomats are becoming increasingly concerned about damage the hunger strike could cause to British-Irish government relations and to Britain's image in the United States according to sources.

Apparently critical accounts in the American media about the British role in Northern Ireland and anti-British demonstrations by Irish Americans have caused consternation in the British media and Parliament. One government minister said recently that the British Foreign Office believes the hunger strike "has become a major embarrassment around the world."

Significantly, two respected British newspapers at opposite ends of the political spectrum, the libeal Guardian and the conservative Financial Times, said in editorials today that the hunger strike could and should be settled by the government making clear to the prisoners the changes it is ready to adopt in the prison regimen.