Irish Prime Minister Jack Lynch, confronted by a growing party rebellion over recent by election setbacks, an economic slowdown and his moderate approach to the problem of Northern Ireland, today announced his resignation.

"It is obvious to me that the time has come for someone with a new approach and fresh thinking to take over as leader of the government," Lynch told parliament members of his Fianna Fail Party in Dublin.

His successor as party leader, to be chosen by Fianna Fall members of parliament on Friday, will become prime minister after Lynch's formal resignation early next week. Fianna Fail, which regained control of the Irish government in the last national election in 1977, still holds a large majority in parliament despite a marked decrease in its support this year.

Lynch, 62, who has been prime minister for nine of the last 13 years, had planned to retire by the middle of next year to give his successor time to establish himself before the next national election in 1982. But he had not been expected to leave office before trying to choose his successor himself.

The leading contender to succeed Lynch is the one man he was known to oppose, Health Minister Charles Haughey, Lynch dismissed Haughey from his Cabinet in 1970, when Haughey was accused of conspiring to import guns for use by the outlawed Irish Republican Army in British ruled Northern Ireland.

Haughey was acquitted of the charge but has retained a reputation as an aggressive nationalist bent on reuniting Ulster, which has a Protestant majority, with the predominantly Catholic Republic of Ireland. Haughey's opponents in the Irish government have said he was behind a hardening of Fianna Fails's position on Ulster five years ago and the recent criticism inside the party of Lynch's more moderate policies.

Lynch has cooperated with the British to tighten border security to combat IRA raids into Ulster from Ireland. And he has told the British he would not insist on a formal guarantee of future Irish reunification if the Catholic minority could share power in an Ulster home rule government.

Lynch, a slight, soft-spoken man sometimes criticized for not being decisive enough in his leadership, insisted at a press conference today that he does not believe these policies would necessarily change if Haugheny succeeds him.

"The party is solidly behind the government policies," Lynch said, "and I do not believe the approach on Northern Ireland would change if Mr. Haughey were elected. He has never expressed any differences to me, either publicly or privately."

Haughey, a 54-year-old millionaire businessman, is a ruddedly handsome, charismatic polician. After returning to the Cabinet, he gained wide favor with well-publicized campaigns to reduce smoking and improve health in Ireland.

Lynch's favority candidate to succeed him as been Finance Minister George Colley, also 54. He gained national prominence after Fianna Fail regained power in 1977 by rapidly carrying out the party's promise to continue fueling Ireland's recent economic boom but cutting taxes and increasing government spending.

But when rising energy costs, long government employe strikes and increasing inflation slowed Ireland's phenomenal rate of economic growth during the 1970s, Colley was blamed along with Lynch. A rather colorless politican, Colley particularly alienated rural Ireland when he decided to increase the artificially low taxes paid by Irish farmers.

The biggest embarrassments for Lynch and Colley came in recent months when Fianna Fail suffered heavy losses in the Common Market's elections for the European Parliament and two Irish by-elections for vacanted seats in Lynch's home territory of Cork in southwestern Ireland.

Possible compromise candidates to succeed Lynch are Foreign Minister Michael O'Kennedy, 43, who is believed by some politicans to be too inexperienced in domestic government, and industry Minister Desmond O'Malley, 40, who has shared some of the blame for the economic slowdown.

Lynch, who first gained national fame as a star athlete in the Irish sports of Gaelic football and hurling, was himself a compromise alternative to Haughey and Colley when he was chosen to be party leader and prime minister in 1966. He has been a pragmatic politican who sought compromise solutions to tough problems in Ireland's bruising political arena.