A type of Bäcklund-like invariance transformation for a class of second-order ordinary differential equations