Not really, unless the shark is relatively smaller.
This is a common believe, based on the record of a bottlenose dolphin killing a leopard shark, that was publicized by Flipper TV show.
The truth is that dolphins will avoid natural predators whenever is possible. In the wild, dolphins and sharks pretty much leave each other alone, but 70% of wild dolphins show some degree of shark scarring.
In many cases, dolphins are able to elude attack by detecting through echolocation.