If someone says "X and Y are different.", does it only mean "X is different from Y."? Is there any chance in which it means "X is identical to Y but both are different from others."?
You're right that it's ambiguous. It could mean either of the following:
- X and Y are different from each other. (joint interpretation)
- X and Y are different from Z. (distributive interpretation)
In the joint interpretation you're considering X and Y as a single unit.
In the distributive interpretation, you're considering X and Y individually, so the second meaning can be rephrased as follows:
- X is different from Z, and Y is different from Z.
This is a little different from what you said in your question – there is no implication that X and Y are identical. They could be the same, or they could be different. But you're right that it's ambiguous whether X and Y are different from each other or from something else.