Quantum and classical ratchet motions of vortices in a two-dimensional trigonal superconductor