Your should have turned him in - for your protection. My uncle had a roommate pulling something like that. (the roommate was actually a cop who would find open doors and then rob the place while checking out why the alarm was going off). My uncle figures that given how quick his roommate was arrested after he turned his roommate in that they already know his roommate was doing something and were just looking for evidence because there is no way he wasn't involved in the crimes.
I don't think the two situations are that similar. I'd turn in a dirty cop in pretty much any context, but probably not a friend since junior high for theft.