Bringing in an outsider for a job on your own initiative can open up your employer to all kinds of nastiness, for instance, maybe there is someone in line for promotion that immediately has a case because the job was never posted.
Really, this will work only very rarely, if you're working for 'bigcorp' x, I'd highly advise against trying a stunt like this.
You also can't just disclose all kinds of stuff to third parties that are not under an employment contract. Even a librarian has access to all kinds of private information. No wonder his boss was a little 'stunned'. What's wrong with talking it over beforehand instead of presenting your boss with a fait-accompli ?
I worked for a company as a co-founder/shareholder in the mid 80's and was in the situation that I too wanted to quit, I talked it over with the owner ('DGA' in dutch, mine was a minority share), suggested that I would talk to a friend of mine, he said, fine, go ahead.
That's the correct sequence.
Incidentally, my friend still works there today!