For the purpose of getting a consistency requirement, one can augment the matrix on the right with an identity matrix. Here is your example.
RowReduce[{{1, 2, a, 1, 0}, {2, 4, b, 0, 1}}]
Out[10]= {{1, 2, 0, -(b/(2 a - b)), -(a/(-2 a + b))}, {0, 0, 1, 2/(
2 a - b), 1/(-2 a + b)}}
In effect the last columns give the requirement that, for the indicated pivots to be correct, 2a-b not be equal to zero.
Explaining this to students first encountering the subject might be another matter though.
Another possibility, which might or might not work reliably, is to use LUDecomposition.
LUDecomposition[{{1, 2, a}, {2, 4, b}}]
During evaluation of In[12]:= LUDecomposition::sing: Matrix {{1,2,a},{2,0,-2 a+b}} is singular. >>
Out[12]= {{{1, 2, a}, {2, 0, -2 a + b}}, {1, 2}, 1}