Depends entirely on what’s in the book, who the author is, whether it’s fiction, or non-fiction, etc. I’m mostly talking about fiction below.
I love Neil Gaiman’s writing, but I’ll never buy another new book of his again. I love reading H. P. Lovecraft’s Cthulhu Mythos, but I hate his racism. Etc.
It’s easier when the author is dead and the objectionable stuff has long since been denounced by (at least most of) the wider society. Like the racism in Robert E. Howard’s Conan stories. If the author is still around and the bigotry still widely accepted, nope. Like the transphobia of J. K. Rowling.
People also tend to do this weird thing where they believe what they’re told first and that gets lodged in and is hard to remove. Like the accusations of fascism leveled at Starship Troopers. People hear that, assume it’s true, then read the book. Unsurprisingly, they then gloss over everything that disproves that reading. Confirmation bias, basically.
There are maybe two of the more modern 14 points of fascism in the novel. And there’s nothing to suggest the earlier definition of fascism as the merging of corporate and government power. But because voting is limited to those who serve the community (teacher, librarian, soldier, etc) and the book is military sci-fi, it somehow becomes a pro-fascist book. You could make an equally flimsy argument the book is pro-communism for the same reasons. Only those who serve the community are allowed to vote.