Well the "girl code" isn't some universal thing that all girls abide to so it really depends on your friendships. But as a general thing, it's probably safe to not hook up with your best friend's ex hook up not because I said so or because a girl code said so, but because you care about your friend and you wouldn't want your friend to get hurt. Unless you've asked your best friend if she'd be okay with it and she said sure, don't go for this guy because you could risk hurting your friend.
One thing that kinda bugged me was when one of my friends who I used to be really good friends with would go after almost all the guys I liked or hooked up with. More often than not, she would be more successful in seducing them and I ended up being "the female friend all the guys want to have." It was really annoying and even though it didn't hurt me all that much, it just proved to me that this friend isn't really a good friend because she was being rather inconsiderate to our friendship.
That's why no, don't hook up with this guy until you talk about this to your best friend. Yes you have the right to hook up with whoever you want, but if you want to be considered as a good and considerate friend, you'd put your friend's feelings into account. And you guys are best friend, so you should be able to bring this up easily to each other. If not, then maybe you aren't as close of friends as you think you are...