The tool you're describing does exist. You can see it at the top of this photo.
It has an adjustable clamping system so it can be clamped at the ends of the work piece.
The glass of Coke is on top of the stop piece.
If you go to a good tool shop I'm sure they'll have something similar.
I used it to guide a router to cut the holes for a sewing machine table I built July last year.