It was part of the Polish-Lithuanian Commonwealth at the time, which was in the process of disintegrating thanks to Prussia and Russia tearing pieces off it beginning in 1792. The Poles staged an uprising against this in 1794, but the Polish-Lithuanian Commonwealth was no more by 1795. This is the much simplified and abbreviated telling of what was going on. Look up Kościuszko Uprising for more.
That said, I don’t think the Poles want to annex parts of Ukraine or Belarus, They have learned the hard lessons of the past about the terrible headaches that come with multi-culti and like their nice mono-ethnic country.
It’s true they are really down with spouting bellicose rhetoric and are loving being US Daddy Warbucks’ golden child right now and sticking out their tongues at the Germans, but that doesn’t mean they want to absorb a bunch of Western Ukrainians and Belarusians and all the problems that would bring.
Death of a President is not at all a fun flick, but it shows the problems Poland had when it controlled parts of Ukraine and Belarus. Poland will have enough trouble with the refugees it has already taken in, and doesn't want more territory and more Ukranians.