They could, but I don't think any church that was sued for refusing to perform a same-sex marriage would have to worry about legal fees. ADF, ACLJ, and any number of other Christian legal associations (not to mention individual Christian lawyers) would jump at the chance to defend a small church (pro bono) in that type of case.
It won't make any difference who chooses to defend a small church against against this assult on their 1st Amendment rights. The 2nd Amendment is undermined again & again by activist liberal judges, and they will do the same thing to churches who do not perform same sex marriages, irregardless of what the 1st Amendment proclaims.
If judges rule against Christian businesses for refusing to provide wedding cakes to homo couples, why would they not rule against churches or pastors who refuse to perform same-sex marriages. It's only a matter of time before judges will declare anyone who opposes same-sex marriages to be declared hate-filled homophobics who could lose their children or property for refusing to endorse & perform same-sex marriages.