The rref() function would copy the matrix to a matrix over the field of fractions of its base ring, then return echelon_form() of the new matrix.
CC: @williamstein @kcrisman @rbeezer
Component: linear algebra
Issue created by migration from https://trac.sagemath.org/ticket/3211