If the film was damaged in the cartridge it would have been difficult to operate the camera. The film probably would have gotten hung up in the film path.
If it was damaged in the camera, it would have been difficult to rewind the film. It probably wouldn't want to go back into the cartridge. In either case you would have known something was wrong. Did you notice anything?
What kind of camera is it? I can't think of any late model 35mm. camera that would damage the sprocket areas the way you describe. (Not that there isn't one. I just don't know of any.)
Thus, I would have to agree that the damage occurred some time between taking it out of the camera and loading it into the canister.