Yes but virtually attending a funeral in any other circumstance is not okay. I mean, I can't imagine not leaving my country if my best friend/mom/dad pass away (sadly it will happen one day).
Hence, if the country's borders are open, I would say going to a funeral is not necessarily an emergency per se, but is unavoidable and something you need to do if you are invited/were part of that person's family/close friend circle.
Anyway the OP never mentioned what the emergency was. So not sure why we're talking about this.