Bi-fold doors use channels mounted to the underside of the door opening. Most of the load presented by these doors is taken up by the hinges, but the track serves to guide a roller at the edge of the door panel. Some shower doors are suspended by rollers, which take the entire load of the door.
If one is handy, one could use a shower door track secured to the wall and mount the wheels to the edge of the desk or to the underside with the wheel extending. I am able to remove my shower door by lifting it, moving it in a direction perpendicular to the track and pulling the bottom edge clear.
In the case of the desk, you would want to have a second "idler" wheel which pushes against the track, pulling the guide wheel into its rail, preventing such a movement. Another method of preventing the guide wheel from disengaging would be to have wheels riding outside of the track, preventing the sideways movement necessary to disengage the guide wheel. This is more like a monorail design.
The above thought process leads me to consider some amusement park rides in which a series of rollers/wheels surround a large diameter tube (ride track) but this could become unsightly.
Think of a handrail mounted on the wall. The rail need only to be secured at the top and bottom, just outside the travel range of the desk. Behind the rail, between the rail and the wall, the securing wheel/roller pulls the desk to the rail, while side wheels prevent left/right misalignment. If necessary, another wheel between the desk and the rail keeps the desk from contacting the rail.
The image above is necessarily more robust and perhaps more complex than that needed to protect a stand-up desk, but works well enough as a concept clarification. One word is worth one one-thousandth of a picture.