Medicine cats are a rank that always seems seperate from the others. Closest to StarClan, with the least involvement in basic staples of Clan life like hunting and fighting, these beleagured med students have the most unique place in Clan culture out of any rank.
Medicine Cat codeMedicine cats don't have a "code" in the same way regular warriors do. The idea that they do is pure fanon. Don't get me wrong, they still have to follow the warrior code like everybody else, and they have internal rules that are different from other cats. But the idea of a "Medicine Cat Code" is never mentioned anywhere in the books.
All that being understood, these are the rules that medicine cats generally have seperate from other cats:
No mates or kits.
Ability to have friends outside of your Clan.A very unnofficial rule. Medicine cats are all pretty much friends with eachother, especially in modern times. They're friendly, they gossip, and they ask eachother for help and advice on difficult patients. (I swear that they did this with Cinderpelt and Deadfoot, but I can't be sure. Or maybe it was when Deadfoot was Hopkit. Can't find it in Tallstar's Revenge.)
This is pretty much fine since...
No talking about your StarClan visions, unless absolutely necessary. (Like an omen or warning.)Usually your mentor is excempt for this, as is other medicine cats. Usually, cats will only discuss their visions with other medicine cats if it affects multiple Clans. Otherwise, you could alert other Clans to weakness in your Clan.
No lying about something StarClan has told you.This applies to all cats, but Medicine cats in particular.
No harming anyone for any reason, unless for self defense.This comes with notable exceptions: ShadowClan medicine cats, who use deathberries for euthenasia, and Mothwing, who volunteered to claw the living daylights out of Squirrelflight, (who asked to be harmed in a non-fatal way to fake her death in The Broken Code), after Jayfeather refused on the grounds of being a healer.
Mates and kitsMoth Flight is the one who made up this particular rule. She had kittens while being a medicine cat, felt immense guilt that she was too busy to properly raise them, and then made the rule that no one could even have a mate.
Nowadays, the logic as explained by modern medicine cats is that, "if you have a lot of patients in the den, and one is your kit, you're going to spend more time on them and neglect the others." This logic is flawed for obvious reasons, since as a medicine cat you'll still have friends and parents and siblings. We can even see that logic dissolve when Squirrelflight gets injured in one book, and Leafpool and Jayfeather dote on her, since she's Leafpool's sister and Jayfeather's mother.
Practically every medicine cat to ever live has broken this rule, or seriously considered it. As far as I know, though, the only one to ever get caught and punished was Leafpool, who was demoted to a warrior after the truth came out. They soon returned her to the medicine den, however, seeing as it felt very silly to have a fully trained doctor just lying around and refuse to let her actually heal anyone out of principle.
battle immunity, herb destroying, "extra evil to attack a med cat", ability to travel between territories