Ireland formally left the Commonwealth and declared itself a republic in 1949. In response, Britain’s Ireland Act 1949 acknowledged that Ireland, to quote, “ceased to be one of His Majesties dominions”.
Before that event, the Statute of Westminster 1931 effectively granted full autonomy to those countries which held dominion status within the British Empire. Ireland took that one step further in 1949 by removing any even token constitutional links with Britain. (Canada, Australia and New Zealand did similar during the 1980s -although all remained members of the Commonwealth).
Not that Commonwealth membership has any great significance. Not all former British territories are Commonwealth members - Ireland and Myanmar (Burma) two name two. Conversely, some of its members (eg. Cameroon and Mozambique) never ever were part of the British Empire.