No there is nothing wrong with correcting your cat despite what others say just make sure you are patient with them before dishing out punishment

Uh, no there's nothing wrong with it if your goal is to make the behavior worse. Cats often spray because they are stressed and punishing them will only stress them more, thus making the behavior more prevalent. Feliway works pretty well to stop spraying, it releases a pheromone that calms them. When a cat is calm they are much less likely to spray.

That being said, I would take the cat to the vet for a check up. It's possible that she has a UTI and either has trouble making it to the litter box in time, or now associates the litter box with the discomfort of going pee and chooses somewhere else to go. If a UTI isn't the case at least the vet may have some helful suggestions as to how to get the cat to stop peeing in the dog bed.