In How to implement the modified source code of Tor?, OP may be asking about using a tor binary built from customized source code.
The public Tor network rejects customized clients and relays, right?
Tor network sometimes rejects/avoids nodes that misbehave in some way, e.g. by sending invalid traffic or (in the case of exit nodes) modifying exit traffic, see the badRelays page on the wiki.
However, such misbehavior is often caused by misconfiguration or by some other entity (an antivirus program, the node operator's ISP) modifying the traffic that the tor binary sends, rather than by a modified/customized tor client binary.
Thus, if a customized node is behaving correctly, as far as outward appearances go, then it will not be rejected; indeed in many cases it won't even be possible to identify such a node as having been customized/modified.
The design of the Tor protocol does not depend on everybody using the same "trusted" implementation of Tor; rather, Tor is designed with a threat model in mind where a malicious entity might operate multiple modified Tor nodes.