* The BFG: The Big Friendly Giant tells Sophie stories about pirates, including one about a pirate who uses a giant as a "pet" to help him steal treasure.
* Charlie and the Chocolate Factory: The character of Captain Hook, from the story of Peter Pan, appears as a chocolate character in the chocolate factory. While not technically a pirate in the book itself, he is strongly associated with pirates.
So, while no central character is a pirate, the concept of pirates is present in a couple of Dahl's stories.