We present a comprehensive ultrasound study of the prototypical heavy-fermion material CeRhIn$_5$, examining the origin of the enigmatic 30 T transition. For a field applied at 2$^circ$ from the $c$ axis, we observed two sharp anomalies in the sound velocity, at $B_m approx$ 20 T and $B^* approx$ 30 T, in all the symmetry-breaking ultrasound modes at low temperatures. The lower-field anomaly corresponds to the well-known first-order metamagnetic incommensurate-to-commensurate transition. The higher-field anomaly takes place at 30 T, where an electronic-nematic transition was previously suggested to occur. Both anomalies, observed only within the antiferromagnetic state, are of similar shape, but the corresponding changes of the ultrasound velocity have opposite signs. Based on our experimental results, we suggest that a field-induced magnetic transition from a commensurate to another incommensurate antiferromagnetic state occurs at $B^*$. With further increasing the field angle from the $c$ axis, the anomaly at $B^*$ slowly shifts to higher fields, broadens, and becomes smaller in magnitude. Traced up to 30$^circ$ from the $c$ axis, it is no longer observed at 40$^circ$ below 36 T.