Just because you have a panic attack does not mean that you have panic disorder.
Panic attacks can occur when you are very anxious, scared, or frightened. Not being able to perform a ritual “just right” can evoke a great deal of anxiety for a person with OCD, and it is possible that a panic attack could be the result of that anxiety.
For a diagnosis of panic disorder, panic attacks need to occur out of the blue. Because the panic attacks mentioned here are related to the inability to complete a ritual, they are related to an event and not just randomly occurring.
Therefore, panic attacks in this instance are a result of the OCD and the difficulty with completing the ritual, and not a result of panic disorder.