We present a comprehensive ultrasound study of the prototypical heavy-fermion material CeRhIn5, examining the origin of the enigmatic 30 T transition. For a field applied at 2∘ from the c axis, we observed two sharp anomalies in the sound velocity, at Bm≈20T and B∗≈30T, 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∘ from the c axis, it is no longer observed at 40∘ below 36 T.