Would the fact that it is a protestant funeral for a Catholic make a difference? The Code of Canon Law is speaking of protestant funerals presumably for protestants. If a Catholic "marries" in a non-Catholic ceremony, a Catholic may not attend, no matter whose wedding, as far as I understand it. Would a similar rule apply for funerals? Personally, I would ask a knowledgeable Trad priest.
.
The OP specifically said that a Protestant service would be held "at the grave site," which I took to probably indicate that the service was something that was not requested by the decedent but by the survivors. Which is not to say that the decedent would have objected, only to point out that having a Catholic explicitly reject a Catholic burial is very different from having a Catholic who did not explicitly reject a Catholic burial.
.
In cases where one is being invited to a protestant service
for and by a Catholic, there are not "different" rules, I think it simply falls under the rule of not causing scandal which is already built into the general rules the code lays down for attendance of non-Catholic services. It certainly complicates things! For, it is positively sinful that a Catholic voluntarily marry outside of the Catholic Church, so even passive attendance risks causing scandal whereas a wedding between two protestants baptized protestants would not have that element. In the case of a funeral where a Catholic actually
planned to have a non-Catholic burial, a similar element is at work.