I have seen a lot of old houses where folks stuck a washing machine discharge hose into a basement floor drain. I suppose that such a system can function if: 1) the floor drain has a trap (it should); and, 2) the drain has the capacity to handle all of the washer waste water discharge without backing up.
However, even if the above conditions are met, this is a bad set up that would never be approved by your plumbing inspector. The codes require that you discharge a washing machine into a standpipe that goes into the building drain. This standpipe is required to have it’s own trap, and it must be at least 2″ diameter.
NtP