Prime Minister Yitzhak Rabin, who withdrew two days ago as head of the Labor Party's list in Israel's general elections next month, will be a candidate and will most likely be a member of by Minister of Defense Shimon Peres Israel's next Knesset (Parliament).

This was worked out today in a concerted effort to patch up differences within the ruling Labor Party so it can present a united party list headed by minister of Defense Shimon Peres. within 48 hours.

The nomination of Peres by the 600-member central committee of the party Sunday night was assured today when Foreign Minister Yigal Allon formally withdrew from the race.

Rabin resigned from the Labor Party leadership Thursday, when it became clear that Israel's attorney general, Aharon Barak, would insist that Mrs. Rabin face criminal charges for two account illegally held in a Washington bank since 1973, when Rabin ended his tour of duty as Israel's ambassador to the United States.

Yet, while Peres may win the nomination Sunday without being officially challenged, the Labor Party's wounds have not yet been healed.

Several groups, including the faction that would have liked Allon to replace Rabin, are still threatening to bolt. Even more serious is the threat represented by Mapam, the left-of-center party that would have run with the Labor Party if it had chosen a less hawkish candidate than Peres to head the ticket.

Although some Mapam leaders hinted today that they would be satisfied if Peres assures known doves, such as Allon and Abba Eban, top positions in his Cabinet, the short time left before the final lists of candidates must be submitted to the central elections committee may lead Mapam to go it alone after all.

That would give the Labor Party - for the first time in Israel's history - fewer seats in the Knesset than its major opposition, the right-of-center Likud Party. Menahem Begin, Likud's leader, would then be asked by President Ephraim Katzir to form a cabinet.

Allon's decision not to try for the party's leadership came after two meetings today with Peres. At the meetings it was agreed that Allon will be given the No. 2 spot on the party's list of candidates, which must be completed Monday.

Neigher Peres nor Allon would comment on rumors that Allon would be minister of defense if Peres is asked to form the new Cabinet. In that event, the new foreign minister would most likely be Abba Eban.

Experts speculated today that if the new party, the Democratic movement for Change, does well in the elections and Rabin is forced to form a coalition with it, its leader Yigal Yadin, may be offered the post of deputy prime minister and the post minister of finances may go to Meir Amit, who until recently served as a manager of Israel's largest industrial conglomerate.

Rabin's exact position in the Labor Party's list of candidates has not yet been decided, but Allon said tonight that he would insist, as part of his agreement with Peres, that Rabin be given a position that would assure his election to the Knesset.

Members of the party's central committee interviewed tonight warned against the impression that all has already been sewed up in the party, Israel's largest, or that it has already overcome the episode.

Anything may still happen between now and the time when the list has to be submitted," one of them said. "I cannot remember a time when so many things were up in the air."

The Rabin bank account is likely to remain a prominent issue in the campaign, but observers here expressed the feeling today that the worst is over for the Rabins, and perhaps even for the Labor Party.