While I know it could have been a hospital I also know the Cork city workhouse operated well into the early 1920s, which is a horrible thought.
From what I can tell they stayed in Clonmel after he left the army. After partition his regiment was disbanded with the others around July 1922. He then enlisted as a volunteer with the Free State Army and was posted to the 25th Infantry. At the time he gave his address as 20 Quin's Lane.
When William married in May 1928 he gives his father as Michael Walsh, carpenter living in Clonmel.
As there is such a gap between James and William I imagine there was another child there, possibly born while Michael was posted abroad. Does anybody know how those births would have been registered? A barracks is usually considered the land of the occupying army so I assume they would have kept their own records and not just registered the birth locally?