As a defendant, one can argue almost anything in defense of one's self and one's case, as long as one (as a pro se defendent, or one's legal representation) is truthful (see Officer of the court - Wikipedia). There is no legal barrier to any argument or framework of an argument, be it religion or philosophy when one is arguing a case. (But there are limits; arguing that you're a sovereign citizen - or that you're the second coming of Christ - and laws don't apply to you might get you jailed for contempt).
I can argue that I'm entitled to take food from the grocery store without paying because I am entitled to it because I am, well, I am me, the greatest person in the history of mankind, and as such, I don't have to buy food. Because I am me.
Would that argument just be discarded?
But the "I am me" argument isn't going to fly in court (and possibly very quickly because the court will not be happy about a frivolous argument not based in the law) against a charge of theft because we're talking about the rule of law, which is established and adopted as a framework of justice in the interest of a legal system fair to all, and not a speculative framework, such as philosophy, or a religious framework based on concepts of faith. The rule of law is a general agreement (subject to change, of course; see below) that certain things are wrong, and there is a price to pay, and that price to pay is written down and established as a norm and formalized through the lawmaking arm of the government, which can change that rule of law in a lawful way. See Rule of law - Wikipedia.
Could a jury be forced to consider the question?
A jury can't be forced to consider a philosophical (or religious) idea. A judge might encourage a jury to consider a philosophical or religious theory as a way to arrive at a verdict, but to arrive at verdict based in the law, not based on that philosophy or religion. A jury can certainly take a defendants' arguments into consideration; that's the basis of their debates. The members of jury may talk among itself about theories and philosophies in order to debate and arrive at a verdict based in the law. Some members of the jury may only refer to philosophy or relgion, and solely and hold out and prevent a verdict from being arrived at, because that juror(s) are pursuing something based in ideology, or they are confused about the rule of law. Those jurors could be removed from the jury (under the rule of law) in order to arrive at a verdict.
Or does each legal system have pre-specified philosophical ground
rules within which trials are held?
It could be argued that our rule of law is derived from a set of philosophical (and arguably religious, too) ground rules that began with the United States Constitution - Wikipedia, and the rule of law as codified as a necessity excludes other philosophical ground rules in the interest of even-handed and fair justice for all.
There are many other rules of law which are based in other legal, philosophical and religious traditions. And those rules of law may include written "ground rules" that are referred to as objective and based on something like a Constitution; or they may include judgements derived from the warm entrails of animals.