It was a school library book I read in the 70s, about a young man marooned in space who is drawn to an alien shipwreck by a ring he is wearing. Can't seem to remember more, but the image has stayed with me...
This sounds very much as though it could be The Zero Stone by Andre Norton (which also has a sequel - "Uncharted Stars"), first published in 1968. The young man's name is Murdoc Jern and he has an alien companion, kind of like a cat, called Eet. One of the most familiar covers (at least to me) is:
There's a reasonably complete write-up by Judith Tarr on the Tor.com website (https://www.tor.com/2018/09/04/throwback-planetary-adventure-andre-nortons-the-zero-stone/).
In that write-up it has the following story details:
Murdoc inherits one thing from his father, which turns out to be worth more than all the rest put together: a strange alien ring of unknown value.
and the piece that makes it most likely to be the book you're looking for:
[..] he barely escapes with his life, this time with the alien, Eet, for company—throwing himself into space with nothing but a spacesuit, a pet carrier, and the ring. The ring latches on to an alien lifeboat, which transports Murdoc and Eet to an unknown world full of inimical aliens, ancient ruins, Guild agents mining for whatever is in the ruins, and a Patrol officer who is convinced that Murdoc is in cahoots with the Thieves’ Guild.
This is one of my all-time favourites from Andre Norton (and there are so many to wax lyrical about) - Android at Arms, the Janus books, the Witchworld series (and the associated Gryphon novels), Moon of Three Rings (with Krip and Maelen), Ordeal in Otherwhere, Dread Companion, and so many more. Just an amazing author. You can find a list of her work at fantastic fiction (https://www.fantasticfiction.com/n/andre-norton/).