The right to healthcare is not related to nationality – with the exception of French nationality (French nationals who have lived in France for more than three months have a right to healthcare under the ‘Puma’ system – which replaced the CMU - on residence grounds, with a requirement to pay an annual fee if their income is above a certain level).
The current right you are describing is EU-based and is for state pensioners (or sometimes people with long-term disability benefits). It means that the state that pays your pension will also pay your state of residence for your healthcare costs. It makes no difference what your nationality is.
So, if you receive a British state pension and became Irish you would not lose the right to have the UK pay for you and Ireland would not be asked to pay instead. However, whether or not the right for the UK to pay for you will continue if and when the UK leaves the EU will be an important part of the negotiations which will follow once ‘article 50’ is invoked.