It would only be a sin if one of the people being married was Catholic but not marrying in the Catholic church. If a Catholic marries outside the Catholic church the marriage is not valid.
This comes up during applications for annulment. In general, when 2 validly baptised (Trinitarian form) Protestants marry their marriage is valid but if one of them were Catholic that would invalidate the marriage because the Catholic sinned by not getting married in the church.
So attending a non-Catholic marriage where BOTH bride and groom are not Catholic is acceptable. If one of them is Catholic or it is a same sex wedding it causes scandal.
Make sense?