Mr Ahern said that while it would be the last resort, the scenario is a “step or two nearer” following the publication of the legislation.
Last week the Government tabled a Bill at Westminster that would empower ministers to override much of the contentious post-Brexit trading regime it agreed with the EU in the withdrawal talks.
Asked if there is a danger that Ireland could become semi-detached from the single market, Mr Ahern said: “Yes.”
Speaking to the Institute of International and European Affairs (IIEA), Mr Ahern said: “If this was to continue on down the slippery slope and the legislation is passed, the EU will say that they have to see the single market implemented and if there is no land border then it has to be in ports.
“I shudder to think – and we saw what the delays were in the harbours and other ports two years ago when there were limited checks.
“You can imagine the difficulty that would create for Irish traders.
“If it was to continue and this Bill was to be passed, if the EU said ‘we can’t get anywhere here, and there has to be checks’, which they will, they ultimately will because they have to protect the integrity of the single market.
“They have to continue with the line that there’s a sea wall around the single market, then there’s a real difficulty because if we want to stay in the single market, then you have to go with checks.
“I think that’s the last resort and it’s something we don’t want to see but I’m afraid after last week’s position it is a step or two nearer.”
Mr Ahern also that said that unilateral action is “deeply unhelpful” in building relationships and trust between the UK and the EU.
“A partnership that is central to the implementation of the protocol, and not just within this country but with the European Union, which was set out in the agreement,” he added.
“The UK’s international reputation as a trustworthy partner is also an issue.
“In Northern Ireland, Brexit continues to exacerbate political tensions within the Executive and last September north-south co-operation ceased, which effectively means there has been no co-operation on the Good Friday Agreement since last summer.”
He told the IIEA that it is clear many in Northern Ireland, particularly in the business community, want the protocol to work well and see the benefits of it.
But the DUP has blocked the establishment of a new ministerial executive following last month’s Assembly election in protest at the protocol, which has created economic barriers between Northern Ireland and the rest of the UK.
The party has made clear that tabling the legislation is not enough to convince it to return to the executive, saying it needs to see tangible delivery on removing the so-called Irish Sea border.
But Mr Ahern said that businesses in Northern Ireland view the protocol as a help to them.
“The protocol presents real opportunities for Northern Ireland due to access to the single market,” he added.
He was also critical of the relationship between officials in the Republic and in Great Britain.
“It has all been extraordinarily negative. My understanding is that at official level, at parliamentary level, at ministerial level, and at heads of state level, that relationships are poor, and this is very disappointing,” Mr Ahern added.
“I think we are in a position now where the atmosphere is toxic.
“I do think in all negotiations it is possible to find solutions, I never believe things are impossible. But it takes two sides to negotiate.”
He described Boris Johnson as a “clever man”, but claimed the Prime Minister has no “great interest” in negotiating with the EU.