How to obtain SNR when we have the samples of a non-DC noisy signal in practice?
Method 1: FFT

Since this is a sinewave, perform a FFT. The FFT peak is your signal, bin 0 is DC offset, and all other bins are noise. Sum the power of all noise bins to get total noise power, the ratio with signal power gives SNR.

The advantage of this method is you can also look at noise spectrum if you are interested in it, and it's pretty simple. It requires a periodic signal though. It can work for signals that are not pure sines, but you will need to ignore the FFT bins which correspond to harmonics of the signal, as these are not noise.

Method 2: reconstruct original signal and substract

If the signal isn't a sine or at least something that FFT handles well, you can reconstruct it, maybe by fitting a signal-generating function to the samples or something like that. If it is a data transmission, you could recover the data, then reconstruct the signal that was transmitted, then align it with the received samples, and substract to get the noise. This is a bit more... hazardous.