No, if done gently and correctly, it should not hurt, but it is always advisable to get the anal expression done through a veterinarian as they may be able to tell you what the root cause was and if something else is a concern.