Yes, a washing machine drain pipe can be installed horizontally, provided that it has a minimum slope of ¼ inch per foot towards the vertical stack.