But short story is yes "rb" and "wb" are valid modes and probably the only modes you should ever use on Windows (unless you actually want magic line ending translation, which generally speaking is better done at a way higher level).
Both modes (text and binary) are equally important on WIndows.
Always-binary "rb"/"wb" approach is good only for regular files.
But when you read data from a named pipe or a COM-port, you have to use text reading mode.
This is because devices (unlike files) do not have an "end of file", and you can't successfully invoke file:read("*a") for a Windows device opened in binary mode.
So, you need to use EOF emulation: the sender appends the "\x1A" character to the data stream, and the receiver opens the device for reading in text mode.
The EOF emulation is the main reason for text mode to exist; LF/CRLF conversion is just a bonus.