Jeremy Corbyn has pledged that Labour will back a second referendum on any Brexit deal put to parliament, but warned of a “deliberately inflamed divide” as he sought to calm tempers among senior party figures.

The Labour leader, who is visiting Dublin to meet Irish taoiseach Leo Varadkar on Thursday, said his party would “do whatever is necessary to stop a disastrous no-deal outcome” and said Labour would work across party lines to block a new Brexiter prime minister who could crash the UK out of the EU.

“Faced with the threat of no deal and a prime minister with no mandate, the only way out of the Brexit crisis ripping our country apart is now to go back to the people,” he said, speaking ahead of his visit to Ireland.

“Let the people decide the country’s future, either in a general election or through a public vote on any deal agreed by parliament. For Labour any outcome has to work for our whole country, not just one side of this deliberately inflamed divide.”

A bitter row has raged in the party’s top echelons about the response to the European election, which saw the party pushed into third place behind the Brexit party and the Liberal Democrats, a result blamed on the party’s unclear Brexit position.

Two of Corbyn’s closest allies, John McDonnell and Diane Abbott, publicly said they fully supported a second referendum. Keir Starmer, the shadow Brexit secretary, and Emily Thornberry, the shadow foreign secretary, have also said they would back Labour arguing for a people’s vote.

Tom Watson, the deputy leader, has been even more strident, saying he supports the idea of a ballot of all members or a special conference to immediately change policy to back a second referendum.

On Wednesday, Watson released a poll of Labour members and supporters taken from a survey he launched after the election results, suggesting 84% wanted an all-member ballot to decide the party’s Brexit policy. “As deputy leader I’ll support them to make this happen,” he tweeted.

Further pressure has come from both Scottish and Welsh Labour, with leaders of both saying they are now firmly committed to a second referendum in any circumstances.

However, moves to push Corbyn into a more full-throated endorsement of a referendum have been resisted publicly by some of his closest allies, including the Unite general secretary, Len McCluskey, and the shadow cabinet office minister, Jon Trickett.

A senior Labour source on the party’s remain wing said internal strife had not been resolved, despite hints from the Labour leader of the Welsh assembly, Mark Drakeford, that a major shift would be seen in the coming days. “The battle is still raging in [Corbyn’s office] about how far to go,” the source said.

On Wednesday, the party chair, Ian Lavery, issued a rebuke to “leftwing intellectuals” and some remain campaigners who sought to push Labour into backing a public vote, saying they were sneering at “ordinary people” with pro-Brexit views and sniping at those who want to see the results of the 2016 poll respected.

In an article for the Guardian, Lavery said Labour would not win a general election “simply by fighting for the biggest share of the 48% [who voted remain]”.

He said both sides needed to come together to fight the prospect of a no-deal Brexit being pushed by some of the Conservative leadership candidates.

“As someone who has opposed a so-called public vote, not least because parliament has no majority for it in principle and nobody has the faintest idea what we would actually put on the ballot, I have been doggedly attacked by certain sections of the party, as well as those on the outside,” he said.

“It does feel that a certain portion of ‘leftwing intellectuals’ are sneering at ordinary people and piling on those trying to convey the feelings of hundreds of thousands of Labour voters. Perhaps, in reflecting on the results, we should consider the effect all of this has had.”

Tensions have been compounded by the reaction of dozens of party members to the expulsion of Alastair Campbell, Tony Blair’s former spin doctor, who admitted voting Lib Dem in the EU elections.

In a rebuke to Labour’s HQ, Watson called the decision spiteful and said members who voted for other parties should be listened to rather than punished.

The expulsion of Campbell led to a torrent of admissions from senior Labour figures that they had also voted for other parties in protest at Labour’s position on Brexit and the hashtag #ExpelMeToo was briefly trending on Twitter.

The former Labour home secretary and party chairman Charles Clarke said he had also voted Lib Dem in the election, while the ex-defence secretary Bob Ainsworth said he voted Green.

Fiona Mactaggart, a former Labour minister, admitted she also voted Lib Dem and said it was “time for us all to declare: ‘I am Spartacus.’”

Watson said members who had voted for other parties to send a message to Labour had been right about its lack of clarity on the issue of a second referendum, compared with rivals such as the Greens, Lib Dems and the SNP.

“It is very clear that many thousands of Labour party members voted for other parties last week,” he said. “They were disappointed with the position on Brexit that a small number of people on the national executive committee inserted into our manifesto. They were sending the NEC a message that our position lacked clarity, and they were right.”

The former lord chancellor and Labour peer Lord Falconer said it remained unclear whether the rules had been followed correctly over Campbell’s expulsion.

“The rules say you’re not allowed to support another political party; does voting for another political party and only saying you’ve done it after the event involve ‘supporting another political party’?” he told BBC Radio 4’s Today programme.

“If it was an offence under the rules, then I suspect thousands, maybe tens of thousands, of members of the Labour party at the European elections broke the rules and that’s not a tenable position.”

Falconer, who said he had voted Labour and did not back a second referendum, said the decision to swiftly expel Campbell was “bound to have been taken high up the chain” and said it would send a message about what the disciplinary process would prioritise.