I have never heard of it being wrong to dance at a wedding with someone other than your spouse. I thought that was fairly normal. In fact, assuming we're just discussing normal social situations, I thought it was normal to dance with someone else ****if you choose****, just as it would be normal for you to "cut in" on another dancing couple.
I have heard of a wedding party dance where the attendants who walked down the aisle together dance with each other for a short time.
However, if you have a religious restriction on dancing with another partner, then you should bring this up with the bride. I would hope she would be reasonable, because honestly no one is going to care who dances with who. No one.