Although a Toffoli gate can be equivalently implemented using several single-qubit and two-qubit gates, it will consume much resource, two of which are nonlocal controlled-NOT (CNOT) gates acting on two non-adjacent nodes, especially in distributed quantum computation (DQC). We, for the first time, employ an ancillary qubit to construct a nonlocal Toffoli gate for DQC in linear network topology. The ancillary-qubit-based scheme needs fewer qubits, quantum gates, and entanglement states than that based on quantum teleportation scheme and the entanglement swapping scheme. We also analyze the performance of the three proposed schemes under different application scenarios, and present their pros and cons. Our work will help to implement DQC in noisy intermediate-scale quantum (NISQ) era.