So, to answer your question, you do not have to be Dark sided to follow the Code of the Sith, but you do to live by the philosophy of the strong dominating the weak.
Which is not natural of the force, and therefore is a philosophy of the dark side.
Let's get real here: the Sith Emperor is almost a pure manifestation of the dark side of the force. Same guy who seeks to destroy the whole galaxy. Just so he can be the most powerful. He is beyond a Sith Lord, he is the Emperor.
He is the model of the Sith.
While it's also perfectly legit to play as a light side Sith character, because of it's story, and how it is written. It is lore. They are more of a gross. Just like how there are dark force users that are from the Jedi Order.