It COULD be a bad voltage regulator or bad battery but I strongly suspect the actual problem is a lot simpler to fix, not to mention free. Remove both battery connectors and wire brush them and the battery posts so they are bright and shiny clean. Auto parts stores sell a wire battery brush for $3-5 that has a male and female wire brush made for this very purpose.
View attachment 2916
Then reattach both connectors tightly enough with the clamp nut on the connectors that you can't move the connectors around on the battery posts even with considerable hand pressure. That fixes most problems like this.
This problem is commonly caused by a battery connector that is corroded/loose/dirty enough that the voltage regulator isn't seeing the voltage from the battery so it keeps increasing the voltage from the alternator to the point the voltage indicator eventually pegs on the right side of the gauge.