There is no historical basis for solidarity between Poles and Ukrainians. Quite the opposite, Ukrainians were oppressed serfs working on Polish estates.
Ukrainian, Belarusian, and Lithuanian nobles became polonized over centuries, just as further west Polish, Czech, Croatian, and Slovenian nobles became Germanized or Austrianized. For most of the peasants, the conflict with the nobles as overlords was more important than the ethnic differences that developed later. Many peasants just thought of themselves as “people from here” until ideologues and propagandists gave them national consciousness.
The basis for solidarity now would be being stuck between the Russians and the Germans (the West).