Hello,
I assume when you say "attending Mass for a deceased person" you mean that the Priest is not actually offering Mass for that person, but accepted a stipend and is actually offering the Mass for a different intention.
It would be best to do at the same time both of the things you propose: have a Mass offered the repose of the deceased person, and you attend that Mass.