The militants crossed the Zab river by boat and occupied Gwer -- some 40 kilometres southwest of Kurdish regional capital Arbil -- for about an hour before being pushed back, the officials said.
Accounts differed as to whether the attack began late on Friday or early today.
The 26 people killed were members of the Kurdish asayesh security forces, said Barzan Qassab, the deputy head of the asayesh for Arbil, and the toll was confirmed by another asayesh souce.
"It was unexpected," peshmerga Brigadier General Hajar Ismail said of the boat crossing.
More From This Section
IS spearheaded a major militant offensive that has overran large parts of Iraq north and west of Baghdad since June.
The Gwer attack is one of the single deadliest attacks on Kurdish forces since the militant drive began.
After sweeping federal security forces aside and driving south toward Baghdad, IS launched a renewed push against Kurdish forces, driving them back toward their regional capital Arbil.