There are two versions that are possible:
Er hat tanzen dürfen, aber ich habe nicht gedurft.
Er hat tanzen dürfen, aber ich habe nicht dürfen.
Which one is correct?
(Updated: 'haben' declension corrected.)
Apart from the incorrect form of haben, example 1) is correct:
This is because dürfen is a full verb in the second part of the sentence (in contrast to a modal verb as in the first part of the sentence, where there is an infinitive form (tanzen) attached to it) and therefore is inflected differently. You could also dürfen as a modal verb in the second part:
However, as c.p. already mentioned, repeating in detail what is negated is uncommon, and a simple ich nicht suffices:
Furthermore, using the perfect and not the imperfect for dürfen seems odd to me, however I cannot pinpoint why. So, I cannot think of a context in which I would not write or say:
The use of of perfect and imperfect strongly depends on the context in which they are used. In colloquial German, both tenses are considered identical by the majority of the speakers, whereas in written texts the imperfect is used much more often - and rightfully so.
In spoken German "Ich habe gestern getanzt" (perfect) and "Ich tanzte gestern" (imperfect) are considered identical, even though only the latter version is grammatically correct, since the German perfect is 'officially' used in the same way the English present perfect is.
I'd say in this situation (apart from that I hate dancing ;) )