Keeping Ireland part of the UK would be hard, but not impossible.
I do not think Ireland was an integrated part of the UK.
Most British political parties had no MPs in Ireland by 1914.
Ireland was the only part of the UK that required armed paramilitary police to stop rebellions.
RIC main job was not stopped crime, but gathering intel in Ireland to prevent rebellions.
Scotland yard was set up to deal with Fenian bombs in England.
RIC in the phoenix park in Dublin was where the British trained the police armed police force for the empire.
Reports of all aspects of life were gathered on the population so any unusual activity could be monitored.
The big cause of unhappiness with the rebellion in 1916 in Dublin was pay for Irish soldiers in the crown forces stopped arriving leading to hardship for the families dependent on the money arriving every week.
One of the big factors turning the Irish against British rule was the very heavy losses in the battle of the Somme and onwards.
Service in the crown forces went from a good way to provide for your family to a good way of getting the men in your family killed.
The conscription crisis late in the war was a big factor too.
The problem in Ireland is not just a military one.
The tax and court system collapsed in the war of independence. Courthouses and tax office were burnt.
Irish people took their legal problems to the republican courts.
en.wikipedia.org
Families of Police were boycotted leading over one-third of the police leaving the force.
Much rural police stations being abandon and burnt and this lost of intel for Dublin castle made control much harder.
While the British could win a military victory with enough men and money, but they have a very big mess to clean up to get the courts and tax system working and rebuild the police and transport system.
Widespread boycotts of crown forces could continue after winning.
At the end of the war, Britain had a lot of problems much more important than Ireland to deal with so did not spend too much time thinking about Ireland. I am not sure it was worth the trouble it caused to holding on to any longer.
I do not think any other part of the UK had as many rebellion as Ireland with the possible exception of Scotland.
I think there would be more rebellions in the future.
If Ireland had stayed in the union what would have happened?
If Sinn Féin remains an abstentionist that would leave a lot of unfilled seats in parliament.
If they take their seats they could hold the balance of power between the major parties. That could have a very disruptive effect on British politics.
I think Ireland would get bombed in ww2.
Dublin and Cork could get hit very hard. OTL Belfast had very little air defence when it was bombed.
I wonder would the Germans have any better luck arming Irish rebels in ww2 than OTL.
As to the treaty ports.
The important ones were in Derry and Belfast were used.
The British had to ask permission to use them and this was given, but not for the ones in the 26 counties.
The southern ports were not important as the convoys went around Northern Ireland as the southern route was too close to airbases in France.
The economy with free trade and access to the markets in the British trade zone would be stronger.
Irish economic policy of Autarky after Irish independence did a lot of damage to the economy. Only dropped in the early 1960s.
The catholic church would do a deal with the winning side no matter who won.
Strangely the catholic church did not ask for the denomination education system in Ireland.
Protestant churches in Ireland asked for it as they did not want to send their children to schools where the majority would be catholic.
Once denominational education was introduced in Ireland the catholic church was happy with it.