The shadow chancellor said Labour would "go for a people's vote" on leaving the EU if it cannot push the government into calling a general election but any vote would only be on the terms of the deal.
Rows over Brexit have dominated the start of Labour's annual conference where more than 100 constituency parties submitted motions demanding a second referendum and thousands of people joined a march demanding a people's vote on the final deal.
On Sunday, Jeremy Corbyn suggested Labour would shift its Brexit stance towards a vote on the final deal if party members backed it, but insisted that an election was a better way to solve the crisis.
Unite boss Len McCluskey, a close ally of Mr Corbyn, went further, saying Labour could back a referendum on Theresa May's deal or no-deal. However he said offering voters the chance to remain in the EU was "wrong".
Asked to guarantee that Labour would allow staying in the EU on the ballot paper, Mr McDonnell told BBC Radio 4's Today programme: "My view at the moment is that parliament will decide what will be on the ballot paper.
"We'll be arguing that it should be a vote on the deal itself, and then enable us to go back and do the negotiations."
Pressed on whether the public should be given the option to stay in the EU, he said: "The issue now is that, if we are going to respect the last referendum, it will be about the deal, it will be a negotiation on the deal.
"That's why I'd rather have a general election because we can have that, we can then not just discuss the deal, we can also discuss the team that will negotiate it."
Mr McDonnell added: "We're respecting the referendum. We want a general election.
"If we can't get that, we'll have a people's vote on the deal itself and whether we can negotiate a better one."
The Independent has launched its Final Say campaign for a public vote on the final Brexit deal, which has been backed by more than 820,000 people.
Labour's conference in Liverpool will vote on a motion on Tuesday, which could force party bosses towards backing a public vote on Brexit if they cannot secure an election.
The fractious six-hour meeting, which ran late into Sunday night, resulted in a compromise motion that took in dozens of different wordings from party activists.
The key part will say that if the prime minister's Brexit plans collapse but the Tories refuse to call an election, “Labour must support all options remaining on the table including a public vote”.
Meanwhile, Mr McDonnell will use his conference address to launch a radical plan to require private companies to hand over a 10 per cent share of their equity to workers.
He will say that it could net almost 11 million workers up to £500 a year each.
Join our commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies