Conflict Detection Algorithm
Your dancers are vertices of a graph, and there is an edge between two dancers if they are compatible.  A set of dancers is a component if there's what you might call a "chain of compatibility" between every pair of them: that is, every pair of dancers is either compatible or you can come up with a sequence such as "Alice is compatible with Bob, Bob is compatible with Charlotte and Charlotte is compatible with Daniel" to get between them.
A group of dancers who are all compatible with each other are a clique.

What you're looking for is a component that is also a clique. These are easy to find because you can use a greedy strategy.  Suppose we want to know if a particular dancer (say, Alice) is in one of these groups.  We grow a set of dancers as follows.  Initially, the set is just Alice.  Then, we keep adding dancers to the set if they're compatible with anybody inside the set. When we can't add anyone, we've found the component. So now, we just need to check that the component is a clique: that is, everybody within the component is compatible with everybody else.

You can do this more efficiently by checking for being a clique as you add new dancers. Again, start with just Alice.  Then define a set of newcomers to be all people who are compatible with somebody in the set we've built so far.  If any of those people are incompatible with each other or with somebody who's already in the set, Alice isn't part of a group; otherwise, add all the newcomers to the set and select the next set of newcomers.