Koulibaly was sent off with 10 minutes to play in a scoreless match at San Siro, as he was given a yellow card for a foul and then a second yellow for sarcastically applauding the referee.
That red card would prove decisive, as Lautaro Martinez scored a stoppage-time winner for Inter before Dries Mertens was also sent off for Napoli in stoppage time.
After the match, however, Ancelotti was more focused on the treatment his star defender received from the San Siro crowd.
“There was a strange atmosphere, as we asked three times for play to be suspended, they had announcements with the speaker three times,” the Napoli manager said.
Ancelotti claimed that Koulibaly's sending-off was the result of the defender being highly aggravated by the shameful chants emanating from the crowd in Milan.
“Koulibaly was certainly irritable. Usually, he is very calm and professional, but he was subjected to monkey noises throughout the game," Ancelotti said.
"We asked three times for some action to be taken, but the match continued. We keep being told play can be halted, but when? After four or five announcements?
"Maybe we have to take matters into our own hands next time and stop play ourselves. They’ll probably make us lose the game if we walk off, but we are prepared to do it.
"It’s not good for Italian football, seeing this.”
After the game, Koulibaly took to Twitter to send a defiant message.
Mi dispiace la sconfitta e sopratutto avere lasciato i miei fratelli!— Koulibaly Kalidou (@kkoulibaly26) December 26, 2018
Però sono orgoglioso del colore della mia pelle. Di essere francese, senegalese, napoletano: uomo.
⚽ #InterNapoli 1-0
🇸🇳 #KK26 #famiglia
💪🏿 #DifendoLaCittà pic.twitter.com/f9q0KYggcw
"But I am proud of the colour of my skin. Proud to be French, Senegalese, Neapolitan: Man."
Wednesday was not the first time this season Koulibaly has been subjected to racist chants from fans, as Juventus were sanctioned in October for their fans' behaviour toward the Napoli centre-back.