Of course PS can be used as a non- destructive editor by using layers.
Yes PS can, the type of file you use determines whether or not you can use layers though.
A raw file doesn’t support layers, nor does jpg. Programs like LR can open a jpg but don’t actually edit the jpg, instead they use sidecar data. LR and the raw converter in PS use sidecar data as a prescription to make a special set of glasses that you see the jpg through. Each version of the jpg that is saved is simply another sidecar file with a link to the original jpg, not another jpg. Typically the only time LR saves a new jpg is when it is exported out of LR.
A jpg or raw file can be used ‘inside’a PSD or PSB file, say as a smart object, but essentially the smart object (jpg or raw file) becomes just another layer in the PS environ.
When an image is edited then saved as jpg from PS though, that ‘new’ jpg is completely flattened. If that save is is done to/over/replacing the original jpg it is destructive.