I'm sure Vulcans would hold Vulcan philosophy above Starfleet regulations any day and most nights. However, I'm also rather convinced Spock would not be above using Starfleet regulations as a blunt weapon in case the opponent became too arrogant or intrusive...
As for Starfleet being easygoing, it's probably that mainly in terms of camaderie between the participants of five-year exploration missions. Rank and discipline would be supremely important when integrating a newly assembled crew into a working whole, as in Ex Machina
. But acerbic and regularly out-of-line medical personnel are of course a cliche of the classic war movie, and McCoy's underling could simply have been on her way to developing into another McCoy. The exchange happened in private; had it been out in the public, McCoy might have needed to impose discipline.