Catholic theologians as a group teach that marriage can only be between one man and one woman, and Canon #1055 clearly indicates marriage is a covenant between a man and a woman ordered, not just to the well-being of the spouses, but also to the procreation and upbringing of children.
Your instincts to offer support and friendship are good. But your friend is apparently asking you to approve and support him in doing something both immoral and illegal. I do not see how I could possibly advise you it is morally permissible to act as a kind of quasi-official ceremonial witness to a same-sex marriage--whatever that means or implies.
To do that would seem to condone an immoral relationship and the sinful actions involved, where the conscience of your friend really needs changing. To participate in such a ceremony can hardly be less than scandalous. I would judge it objectively seriously evil.
However your friend has resolved his conscience, he should respect yours and hardly expect you to act against it.
I suggest your response should be that you want to be a friend, and that you care for your friend's happiness, but you cannot act against your own conscience and hope he will not expect you to.