In 2-1 decision, judges rule that only an amendment to the party constitution can dispense with an internal race ahead of general election