Agreed. Riker wasn't going to hurt Shelby. He just wanted to remind her of her place because she wasn't following his orders. Both of them were out of line. It reminded me of the sniping between Kirk and Decker in TMP, a clear result of Kirk's leadership by arrogance approach that dominated the film.
How were both of them wrong? Shelby DID go outside the chain of command, which is a big deal in military situations. It wasn't as though Riker had done something illegal or horribly inappropriate that warranted going over his head. He had just rejected Shelby's suggestion. And in doing so had even promised that he would still make the Captain aware of it. For Shelby to run to Picard and say "Riker said no, so I want you to override him" was out of line, and Riker was well within his rights as her superior officer to put her in her place over it.