Sure but it's a poor deal.
Poland takes ~200 million euro for 30 bcm (0.15 bcm/m euro) over ~700 km of pipeline [1]. NS2 would cost 9.5 billion while transporting 110 bcm (0.01 bcm/m euro) [2]. It would take over a decade to break even (ignoring maintenance costs or any sort of cost overrun) and the world has been moving away from fossil fuels so it'd break even at a time when nobody wants it.
[1]: https://www.dw.com/en/can-ukraine-do-without-russian-gas-tra...
[2]: https://en.wikipedia.org/wiki/Nord_Stream#:~:text=For%20Nord....