Nowitzki has played for the Mavericks since joining from DJK Wurzburg in 1998.
The German was the NBA Finals' MVP during the team's 2011 championship year and is a 13-time NBA All-Star, but at 38-year-old is coming to the end of his career.
"If things don't go so well and it hurts everywhere, it could be that 2017 will be the end," the forward told German magazine Sport Bild.
"Actually, my plan is to complete the 20 years and play for Dallas until 2018.
"But just because I have signed a two-year contract doesn't automatically mean that I will play for two years. It could happen next year."
Nowitzki is currently struggling with a persistent Achilles tendon problem, has not played since November 25 and says he wants to speak to Mavericks' bosses next summer about his future.
Meanwhile, the Mavericks are patiently waiting for Nowitzki to return having only played five matches of the 24 games in the current NBA season.
Dallas beat Denver Nuggets 112-92 on Monday, but remain bottom of the South-West Division with six wins and 18 defeats.