I think you are confusing Marco and Law abilities. Law can sacrifice his life to grant someone immortality.
There has never been any mention of Marco having any special power that requires sacrificing his own life. And it's very unlikely that ability would exist, since Marco is a Zoan, not a Paramecia with powers that meet certain "conditions".
And Brook is the only Devil Fruit that can revive the dead, and it only works if they consumed it while they were alive. Moriah cannot revive the deads, only use their bodies.
Also why would Marco transfer his Devil Fruit to Ace? His flames can already heal other people. But it does not work to the extend of the injuries Ace or Whitebeard received from Akainu.
And Ace already consumed a Devil Fruit. If he had another fruit, instead of being healed by the Phoenix ability, he would just die.