After Manchester City's win over Villarreal in Spain, Bayern are now three points clear at the top of Group A with two games remaining, but Munich will be without their vice-captain for several weeks.
Schweinsteiger was stretchered off midway through the first half after landing heavily on his right shoulder with his side 3-1 up after striker Mario Gomez's first-half hat-trick.
Bayern then suffered a second-half scare and were left rattled as Argentina defender Federico Fernandez scored the second of two headers with ten minutes left to set up a tense finale.
"We deserved the win, but two events in the game left us under pressure," said Heynckes.
"Their second goal and the injury of Bastian Schweinsteiger set us back, it really hurt us and was a bitter disappointment.
"The players obviously tried to compensate for the loss of an injured team-mate, but Bastian is a very important player for us.
"If he needs an operation, then he will be out for a long time."
Schweinsteiger will definitely miss Germany's friendlies against Euro 2012 co-hosts Ukraine in Kiev on November 11 and the Netherlands four days later in Hamburg.
He is also likely to miss Bayern's remaining Champions League games in Group A against Villarreal on November 22 and the trip to face Manchester City on December 7.
Gomez's treble means he has now scored 19 goals in all competitions this season for Bayern and this was the ninth time he has scored three goals or more for Munich since joining from Stuttgart in 2009.
"We put in an exhilarating first-half, that was real fun," said Gomez.
"I was lucky enough to be the one in the middle for the three goals."
Despite their defeat, Napoli exposed Bayern's defensive frailties which pleased coach Walter Mazzarri ahead of his side's next game at home to City on November 22.
"We turned things around well, but at the end it wasn't enough to influence the result," he said.
"We created several good chances in the second half, but we just couldn't convert them.
"The result wasn't what we deserved, but I am happy with the performance.
"We will do everything we can to beat Manchester City to try to qualify, when we see what we have achieved at this stage I am very pleased."
Both sides finished with ten men as Napoli midfielder Juan Zuniga was sent off on 70 minutes after being shown a second yellow card, while Bayern defender Holger Badstuber suffered the same fate seven minutes later.
The pair will miss their teams' next Champions League games.