I'm not sure. There's probably hundreds of things one of us knows that the other doesn't. I'm sure my wife keeps lots of peoples secrets!
Maybe there's situations where you can't or shouldn't keep something secret from your spouse.
But your scenario said to keep a secret about something happening in the friends life. I took that to mean it had nothing to do with your spouse. If your friend doesn't want your hubby to know about it (and it has nothing to do with your hubby), I think it's fine not to tell your hubby.
Believe me, as a hubby, I really don't even want to know what is going on in my wifes friends lives!!!
But I think this secret is very specific to you, so I'm not sure we can relate to it not knowing what/who it involves.