WARSAW—A Warsaw court ruled on Tuesday that two historians tarnished the memory of a Polish villager in a book about the Holocaust and must apologize, in a case some academics warn could deter impartial research into Poles’ actions during World War Two. More than seven decades on, the conflict remains a live political issue in Poland, where the ruling nationalists say studies showing complicity by some Poles in the killing of Jews by Nazi Germany are an attempt to dishonor a country that suffered immensely in the conflict. The court ruled that Barbara Engelking and Jan Grabowski, editors of the two-volume work “Night without an end. Fate of Jews in selected counties of occupied Poland,” must apologize for saying Edward Malinowski gave up Jews to the Nazi Germans. But it stopped short of ordering them to pay compensation. “The court’s ruling must not have a cooling effect on academic research. …