Germany's victory over Latvia earlier in the day was enough to send them through, guaranteeing the Poles a top-three finish in their qualifying group.
Coach Igor Miličić's side went on to lose 80-69 to Croatia in Gliwice, where poor three-point shooting proved a key weakness.
Qatar will host the 32-team tournament from 27 August to 12 September 2027
It will be just the third time Poland have appeared at the finals.
After finishing fifth on their debut in Uruguay in 1967, they waited 52 years to return.
At the 2019 edition in China, they reached the quarter-finals and ended up eighth.
Poland have one more qualifier to play this year, away to Germany on Monday.
(ał)
Source: PAP, tvp.info