We present a search for the production of a heavy gauge boson, W', that decays to third-generation quarks, by the D0 Collaboration in ppbar collisions at sqrt(s)= 1.96 TeV. We set 95% confidence level upper limits on the production cross section times branching fraction. For the first time, we set limits for arbitrary combinations of left- and right-handed couplings of the W' boson to fermions. For couplings with the same strength as the standard model W boson, we set the following limits for M(W') > m(nu_R): M(W')>863 GeV for purely left-handed couplings, M(W')>885 GeV for purely right-handed couplings, and M(W')>916 GeV if both left- and right-handed couplings are present. The limit for right-handed couplings improves for M(W') 890 GeV.