If I understand the ruling, the court is claiming there can't be a legally determined definition of gerrymandering, but rather that legislatures (states, I'm not sure if he would allow for an overriding federal law that defined requirements?) have to determine it.
IANAL, but my understanding is that the answer to your last question is basically yes, but it's not uncommon for the court to invent definitions. For example, I'm familiar with
standards related to copyright infringement in software which I think were created through court decisions rather than passed by Congress.
So it's not immediately obvious to me why the court couldn't create tests to determine whether a gerrymander was illegal or not, in an analogous way, apart from Roberts' apparent hostility to the kinds of quantitative methods developed by social scientists. I haven't read the decision yet, though.