Ante Rebic sat 1–0 with the quarter to play, before Turkish midfielder Hakan Calhanoglu increased to 2-0 on penalties in the final minutes.
Milan are seventh in the table, on the same score as six Napoli - in qualifying for the Europa League - but with worse goals difference.
Ibrahimovic is approaching comeback after the injury he sustained a month ago.
"I hope to be with him for the next match (against Spal on Wednesday)," Milan coach Stefano Pioli said the other day.