All traps must be installed on the same floor as the fixture served with the exception of tubs and showers.
You can probably find that code bit in the DWV section, not necessarily under washing machines. In any case putting it below the floor would violate the maximum length of the stand pipe code which is 30"
The Need for a P-trap
If you create a waste pipe for any fixture that needs draining, including a washing machine, and the drain doesn't have a properly installed P-trap, you're creating a dangerous situation. The pool of water in the bottom of the trap effectively seals sewer gases inside the pipes, and if you omit the trap, the gases have a direct route into your house. Besides being laden with harmful organisms that you can inhale, some sewer gases, such as methane, are flammable. If the washer is in an enclosed area, you could actually create a fire hazard by omitting the trap or from improper installation.