The Czech Republic international, 36, is now playing for domestic champions Slovan Liberec, who announced his illness, which is a blockage of the main artery of the lung or one of its branches.
The club added that they could not say if he would return to football, and that his health is paramount. He is expected to retire though.
Stajner won 34 caps for the Czech Republic after making his debut in 2002.
He spent 10 years at Hannover before returning to his former club in 2010, and has scored 24 goals in 58 league matches.