The meaning is the same in this context, but not all contexts.
"To ring" is a simple verb.
"To go off" is a phrasal verb with multiple meanings. The common meaning "to go off like a bomb" (to explode suddenly and noisily) fits an alarm clock which goes off suddenly and noisily.
We can say the alarm clock rang (noisily) and the alarm clock went off.
We can say the fire alarm went off (because the bell or siren goes off suddenly and noisily).
We can't say the doorbell went off (because a doorbell normally makes a gentle pleasant sound).