Sort of. In one part of Sonic's history, Silver and Sonic team up to take down Eggman's ultimate super weapon, working together toward a common goal. However, for most of their encounters, the two are more like rivals than pals.
So while they are capable of cooperating when the stakes are high, their relationship is best described as a complicated mix of rivalry and occasional teamwork.