As ex-military personnel, I can attest to interactions between officers varying widely depending on the nature of their relationship, how long they have served together, the reason they are meeting and the need for or the lack of formality between them.
I find the Federation to be very similar to military protocol on modern military ships where the crew is both familiar with the officers and have decent relationships with each other.
As such, there is very little of what is often perceived by civilians as "military protocol" apparent to the viewers. Most people are only familiar with military environments where very junior officers or enlisted men are working with very senior leaders or in environments where discipline is rigidly enforced, such as schools, boot camp or other training agencies.
In the field, there is an already understood rank structure and everyone is clear on their place in it. Thus there is far less of the saluting, command shouting such as "attention on deck!" when the Captain/Lead Officer appears somewhere.
Depending on the military operation it may be counter-productive or actively hazardous for lead officers to be saluted. For example: in an army outfit in the field, no one salutes. This makes it more challenging for snipers to figure out who is in charge and chopping off the "head of the snake" as it were.
As to Data and dismissal, this scene is fairly reminiscent of a crew where there is mutual respect of each other, an understanding of ability and very little need to stand on strict military ceremony and protocol.
If Data were a brand new ensign assigned to the ship, meeting the captain for the very first time and then given this terrible responsibility, Jean-Luc would have never shown any kind of weakness or given the kid a moment of anything other than crystal clarity on his need for Data to be as available as necessary for this mission.
And he would have certainly dismissed him to remind him of his role in the operation. This would have been as much for (new) Data's comfort as for the captain's need to appear as in control as possible.
Perspective matters when viewing military operations and while the Federation may appear very lax, it is because they have such a great degree of mutual respect they can get away with appearing very casual.
Captain Jean-Luc Picard is no slacker when it comes to discipline. For a time he refused to come to the poker games with the crew considering it fraternization, something Captains were not known to participate in. He only did it at the suggestion of his Counselor who thought it would improve his relationship with his command crew.
And it did. But each Captain/Leader leads according to their personal style.