British rock ‘n’ roll icon Paul McCartney has confirmed he will appear in the next “Pirates of the Caribbean” adventure.