Apparently it's true:
From "How Stuff Works"
> Most famously attributed to seafaring pirates, peglegs with wooden cores and metal hands shaped into hooks have actually been the prosthetic standard throughout much of history. While Hollywood has exaggerated their use of hooks and peglegs, pirates did sometimes rely on these types of prostheses. The required materials for these devices could be scavenged from a common pirate ship; however, a trained doctor would have been rare. Instead, the ship's cook typically performed amputation surgeries, albeit with poor success rates.