Rocks is clearly presented as a hero, at least within One Piece’s own characterization of what a hero is. He’s essentially just a slightly more unruly version of Roger, or even Luffy. I think that Xebec also clearly understands what it takes to fight Imu. A few casualties and getting your hands dirty along the way are unavoidable. He isn’t living in a sanitized fantasy with plot protection like the Straw Hats.
He’s also not an anarchist, nor does he believe in causing unnecessary casualties. That’s evident from his responses to both Loki and Kaido. Kaido wanted to subjugate Harald and Elbaf through brute force, while Loki questioned whether Rocks intended to destroy the world. We already know how Rocks responded to both situations, and those answers say everything about the kind of person he really was. Bottomline is that Rocks was a highly ambitious person who knew the evil reality behind the World Government. He has morals, and his mind is clearly on the same wavelength as some other hero-esque figures in the story like Roger, Loki, Luffy, Ace, etc.