How to fix exposed rafter with termite damage?
No, the &quot;by the book&quot; way is to remove the beam all the way back to where there is no damage and replace it.  I doubt this is termite damage it is likely dry rot from a roof leak.  If your roof is NOT leaking then the dry rot will not continue to happen and in fact if the roof was ever redone it could have been leaking before and they just were lazy and decided 1 beam wouldn't be a problem if they even noticed it.
This is not uncommon in roofs.
In your case if the roof is not leaking you can safely ignore it until the roof wears out and needs to be replaced.  Then once they tear off all the shingles you can have them remove the boards from that section and then remove and replace the beam once the roof joists are exposed.  If it is just this one beam it's still safe since the roof isn't weight bearing (unless you live in an area where it snows heavily) but if you can get inside the attic and look at all the beams that would be good.