I work in the military in Ireland and have an idea for an invention based on my military experience and knowledge. I am wondering whether the military hierarchy would have the legal right to claim ownership of my invention as I'm still employed by them.
Possibly. In the absence of an explicit agreement, it turns on whether you made the invention in the course of your duties as an employee. In this manner, Ireland appears to be in line with other Commonwealth jurisdictions.
Thus if the invention relates to weaponry, and you were employed solely as a cleaner, this would likely be outside of your duties (so that you would retain the rights to any patent). However, if the invention related to wireless communications, and you were employed as a signals operator, your employer may arguably be entitled to the patent.
Mason Hayes & Curran provide:
... any work made by an employee in the course of employment belongs to the employer, unless otherwise agreed. Therefore, the two crucial factors in an employer/employee IP dispute are (1) whether the employee is in fact an employee; and (2) whether the works were done in the course of employment.
FR Kelly argue similarly
Where an employee makes an invention in the course of his/her duties, the right to the patent usually belongs to the employer.