That is not true.
An Attorney General is the government's lawyer. He provides legal services to the government, as his client, just as I provide legal services to my private clients. An AG's legal opinions are just legal opinions. There are often influential, and may be given great weight; but they are not binding on a court.
In real life in the real world, the the legal system decides, through judicial process, disputes, disagreements, controversies, or legal questions. Law, including constitutions, statutes, regulations, and decisions of courts of appeal, is a tool used by courts to decide the the issues brought to court for resolution. While the parties may argue what the law is that is applicable to the case, it's up to the court, in the exercise of its judicial function to decide what law actually does apply and how it applies to the facts to decide the outcome. As the Supreme Court ruled back in 1803 (Marbury v. Madison, 5 U.S. 137, 2 L. Ed. 60, 1 Cranch 137 (1803), 1 Cranch at 177), "...It is emphatically the province and duty of the judicial department to say what the law is....."