To me, Rich denied the friendship with More in order to gain Cromwell's favour (which consequently allowed him to advance up the State) as Amnesiac already pointed out. But most importantly, the concept of 'friendship' to Rich acts as a mere stepping stone which enables him to acquire material riches, status and power. To Rich, friendship involves no love or compassion, which justifies his anger when he exclaims "friendship with Sir Thomas More and still no office?" We are positioned to see that Rich admires More when Rich pleads him to "employ" him, however, his weak sense of morality prevents him from understanding the importance of a real friendship. Thus, he has no problem in denying the friendship if it were to secure him a position, even if it meant being political partners with the ruthless Cromwell.
As for the second part of your question regarding Cromwell's surprise that Rich was merely Norfolk's librarian, I guess Bolt is contrasting More's version of friendship (genuine compassion, unconditional love) to Cromwell's (friendship = connections = status).