This is how it’s taught in intro mountaineering courses. In the real world experienced alpinists carry a lightweight ascender, like a Micro Traction or similar, that can also be used for other tasks like hauling or fall protection for simul-leading.
It is a bit more complex. Climbing means falling. The 'ratchet' needs to work under shock loads. And wet/ice ropes radically change the friction numbers. There is a reason why climbers, experienced ones, know and use a great many different tricks for accending and decending ropes. A "big wall" climber can make a belay device out of almost anything, or even nothing.