I brought a second hand I phone 5s tha is registered for beta updates
You can use iTunes to restore the device to the last shipping OS.

You could also delete the beta profile and keep the same OS. There's not much preventing you from keeping the beta updates as well.

Really - there's no downside to inheriting a device with beta other than you want to decide now before you put your data on it. You generally can't restore a new backup to an older OS.