A good sliding system is nothing like the closet track you are remembering, soft close hardware, proper rollers and a slab with some weight to it. Rattling is a hardware and weight problem more than a concept problem. Pocket doors are the harder ask, because the wall has to be opened up, and until someone opens it nobody knows whether there is plumbing or wiring in the way. Get that checked before you commit to anything. We looked at both with Diana Doors
https://dianadoors.com/ and ended up with a surface mounted slider, which cost less and did the same job of freeing up the floor. Measure your wall run first, the slider needs somewhere to slide. If the wall next to the opening has a light switch on it, mention that early, it is the single most common thing that kills a slider plan.