Clearly this is not a person you're likely to invite back... and frankly it takes a lot of cheek to 'take over' someone else's boat.
Can't say I've ever run into that issue with guests, although it's definitely possible to have 'too many skippers' on a boat, esp if a disagreement arises - I do recall one incident years ago when I was quite annoyed with a fellow boater along for the ride who was insisting on doing something differently than I planned.. and we weren't even racing.
Next time you'll have to have that talk before you leave the dock. It's your boat, your calls and your rules.. you just need to make that clear. That said, if you feel someone there can offer constructive advice there's nothing wrong with consulting that person (along the lines of - "should we change that sail? or do you think the wind won't last?") but in the end it's your call unless other arrangements have been pre-arranged....
1984 Fast/Nicholson 345 "FastForward"
".. there is much you could do at sea with common sense.. and very little you could do without it.."
Capt G E Ericson (from "The Cruel Sea" by Nicholas Monsarrat)