Can foreigner work as HR professional?

Any Human Resources professional can share some insights? Is it an unwritten rule that only locals work as recruiter/payroll/etc due to the local knowledge and experience?

It's not as if its top secret. If you have the knowledge of the countries tax system, speak and write in the countries language you can work. Oh, and providing you have the correct visa to work.

But wouldn't the company prefer to hire a local, assuming that they're more familar with the local insights? Even regarding the language alone.. it's already challenging :(

Normally EU and Irish citizens are employed first, but if a qualified person can't be found there then it is open to anyone. That is the general rule. Now if the company abides by it is another thing. You can only try.