Weakly relativistic electron dynamics and efficient X-ray photon emission driven by an ultraintense extreme-ultraviolet laser field