The difference between the value of the relaxation and the root node can come from presolving. MIP presolving can be stronger than LP presolving.
Despite of this, I am not sure whether it is possible to generate Gomory mixed-integer cuts from the C++ API. Typically, you need the advanced simplex routines to extract the required information (row of the tableau, order of the variables in the basis, etc.).
Please also remember that "non-basic" and "non-zero" are two completely different things. A variable can be non-basic, even if it is non-zero, e.g. if it has nontrivial bounds or is superbasic. On the other hand, a basic variable can of course attain the value 0, e.g. in an example, where zero vector is the solution (still, there are more non-trivial cases, e.g. degenerated bases and so on).
So I guess, you should use the C API (you can do this from within C++) and re-read good literature about how to generate general Gomory mixed-integer cuts.