Can two things be different and yet the same at the same time?
For example, a chair (white) does not have one leg and another (black) has all of its legs. As in the question, these two things with different properties are the same.
I think these questions boil down to "equivalence" and "identity". When it comes to equivalence, of course there are a lot of examples of such objects, e.g. 1$ banknote and 1$ by change are equivalent in terms of amount of things that we can buy with this money but in terms of usage they are not equivalent, hence not identical with inclusion of this property, as vending machines might accept only coins or banknotes though they are still equivalent.
When it comes to identity, it really depends up to which level of details or respect to which properties we consider objects. For example, two 1$ banknotes are identical for a money spender but for banks they are not - they have unique serial numbers. Even it might go as deep, as atomic structure or precision of sizes, for example, the width of two A4 papers might differ by 0.0001 cm or whatever which manufacturers usually call "acceptable error".
So, the answer is both yes and no, depending which level of details you need.
It is necessary that they are both different and the same. In order to be different they must be the same in some respect, and to be the same they must be different in some respect.
A comparison of two objects requires they are the same in that both are objects, but different in that they are different objects.
Sameness and difference go hand in hand. When you say 'two things' you define both as being things thus as the same in this respect.
There exists such possibility in the physics, or more priecly in Quantum mechanics what are known as "Superposition principle". It says you can have one ball which is blue and red at the same time. After all when you observe the ball you will observe just one of these colors (blue or red). We (Quantum physicists) call such phenomenon as collapse of wave function.