The quenching cross sections of highly excited Rb $ns(25\ensuremath{\le}n\ensuremath{\le}45)$ and Rb $nd(23\ensuremath{\le}n\ensuremath{\le}44)$ states by CO, a weak polar molecule, are measured, and these experimental data are compared to theoretical predictions where the main process responsible for the quenching is taken to be the Rydberg-electron-CO interaction. It is shown that the long-range Rydberg-electron-molecular-dipole interaction is often dominant leading mainly to $n$-changing and, to a lesser extent, to Rydberg ionization via quasiresonant molecular rotational transitions. It is also shown that the Rydberg-${e}^{\ensuremath{-}}$ ---molecular-quadrupole interaction is negligible and the short-range interaction leading to $l$-mixing processes is less efficient. The agreement between experimental and theoretical values is quite satisfactory.