Could the federal government mandate state universities to not discriminate against out-of-state students? I can't see any way to do so through the constitution, but I am consistently surprised by the kinds of laws that the federal government can make, so I'm obviously not well-versed in the possibilities.
Such a law could probably be passed under the authority of the interstate commerce clause of the Constitution. Price controls on various products have previously been justified under that clause.
Public schools are on a shorter legal leash than private schools are, because they must behave like proper governments do and respect the constitutional rights of their charges. (First Amendment rights are much broader in public schools than they are in private schools). Assuming that we're in a public school, a search of your phone is governed by a watered-down version of the 4th Amendment. They may search your phone if they have a reasonable suspicion that there is evidence of a violation of the law or a school rule, but this is passive with respect to you providing information -- if the phone is on, they can snoop around if they have a reasonable suspicion. The 5th Amendment would be relevant to passcodes: they cannot compel you to give up your passcode. If there was plainly-visible evidence of wrongful activity on the phone which they saw, and then you shut the phone down, then analogous to in re Boucher the courts could order you to reveal your password, under the "foregone conclusion" doctrine. However, it's the courts and not the schools who get to make that determination. One way the school could literally force you, bypassing the legal system, would be to physically threaten you, by beating you or threatening you with a gun or whip. Such physical coersion would be a felony, and it is almost inconceivable that they would do that. What they might maybe do is give you a non-physical ultimatum, of the type "decrypt the phone / reveal the password or we will... expel you / fine you / fail you in your English class / not let you go to any more football games / turn the phone over to the police". The question is, what would be legal versus illegal by way of consequences? I know of no constitutional right to attend football games anywhere, so they might well be able to get away with that deprivation. You might have a contractual right to attend games at a private school. With a private school, there is some contractual agreement between the school and you (least likely, assuming you're a minor) or your parents~guardians (most likely). That contract could imply certain rights, such as attending games, and might spell out a procedure for them to terminate that right. If they don't follow the process, they could be in breach of contract. Apart from contractual rights (which probably involve your parents, not you, but also would be considerable, for example the right to attend and be graded fairly in the English class), you have no protected rights. As you can see, the answer has a lot of "it depends" in it. Suppose your public school had a reasonable suspcion that you had engaged in a criminal activity, and might prove that by looking at the phone – which you shut down. They cannot use physical force against you, but they can try to persuade you, by offering you something that you want which they can legally take away – like attending a football game. If they try to deprive you of something that you have a right to, you can sue them to prevent that. However, they can also seek a court order to compel you to reveal the password, and it is certainly not illegal to inform you that if you don't unlock the phone, they will seek a court order. Whether or not the courts will grant the request is not obvious (incidentally, if the device is fingerprint-protected, you are hosed, since forcing a person to prove fingerprints is not against the 5th). If the school can be very specific about having seen criminal evidence, they have a leg to stand on, otherwise you cannot be compelled to testify against yourself (coughing up a password is a form of testifying against yourself).
The new law wins. That's rather the point of passing a new law-- the legislature wants to change the current law of the land whether that is based on statutes or court rulings. Of course, there are caveats. Prior judicial rulings may have relied on an interpretation of a source of law that supersedes the legislature in question (i.e. based on an interpretation of the state or federal Constitution or based on a federal law that supersedes the state law). In that case the new law would be found unconstitutional or ignored. Or the new law might have an ambiguous interaction with current law that courts would have to resolve. The new law might clearly make X illegal but there may be legitimate questions about whether it intended to make previously legal action Y illegal as well. It is, after all, very difficult to write a law that covers every possible fact pattern one would encounter in the real world.
It is a vanishingly small possibility. First, someone would need to bring a case that an appropriation for the Air Force was unconstitutional. A Federal court is unlikely to find that it is because: The constitution would be interpreted broadly where the thing being considered did not exist when it was ratified. That is, the court would consider if, had the Air Force existed the drafters of the constitution would have wanted it governed by the Federal government or the State governments. Almost certainly they would decide on the Federal government. The Air Force is a direct descendent of the Army - originally being the United States Army Air Force. As such, an alternative line of reasoning for the court is that the army contemplated by the constitution consists of both the Army and the Air Force - the fact that they have been split is not relevant.
There is no federal prohibition against sexual discrimination in public accomodations. Colorado has an applicable state law, which covers "any place of business engaged in any sales to the public", where "It is a discriminatory practice and unlawful ...to refuse, withhold from, or deny to an individual or a group, because of ...sexual orientation...the full and equal enjoyment of the goods...". No provision exempts lemonade stands. Churches etc. are specifically exempted: "'Place of public accommodation' shall not include a church, synagogue, mosque, or other place that is principally used for religious purposes". Sex discrimination is allowed "if such restriction has a bona fide relationship to the goods, services, facilities, privileges, advantages, or accommodations of such place of public accommodation", an argument that can't reasonably be made in the described case. It is also not obvious that running a lemonade stand is a business (the courts will not admit unsubstantiated Wiki assertions as evidence). It would be relevant to wonder what constitutes a "business" under Colorado law. E.g. is a business license required? In Colorado (US) law, it has not been definitively decided whether there can be a religious exception to the anti-discrimination law. Masterpiece Cakeshop was decided without answering that (the state showed clear religious intolerance in its handling of the case). We do not know how a similar case will be decided: Arlene's Flowers was handed back to the state court with the instruction "do it again" (with nothing more than a mention of Masterpiece Cakeshop). The court cannot establish certain beliefs and practices as "valid religions" (Establishment Clause); the proxy expression that is used is "deeply held belief", which includes atheism. The relationship of the issue to the First Amendment is uncertain.
You have a couple major misconceptions about US law. First, crimes against the person are generally punished at the state level. States are not restricted to any sort of enumerated powers, and can pass any law they want to promote the general welfare unless there's a reason they can't. This is called the "general police power," and it lets them make everything from contract law to laws against murder. The federal government has to justify what gives it the authority to pass a law, and cities and counties have to justify their authority with state law or a state constitution, but a state government never has to preemptively justify why they have the authority to pass a law. States are especially not limited to powers listed in the federal constitution. The US Constitution sets up the federal government. State governments are set up by state constitutions, and derive their authority directly from the consent of the people of the state exercising their right to democratic self-determination. The only powers the US Constitution gives to states are minor technical powers involving state-federal relations (e.g. deciding how their presidential electors are appointed). But as I said, they aren't generally limited to any sort of enumerated powers by their state constitution either. Even the federal government isn't limited to "protecting rights listed in amendments." That's very little of what it does, in fact. Congress has powers listed (for the most part) in Article I and Article IV. It can pass laws banning murder in DC because Article I lets it exercise exclusive jurisdiction (meaning general police power) over DC and over federal enclaves. Article IV lets it exercise general police power over US territories, and pass laws regarding other federal property (I think it has a general police power there too, at least according to current law). The Necessary and Proper clause gives Congress the power to protect its own operations by, for instance, criminalizing the murder of a federal judge. Etc. Where there isn't a clear thing that lets the feds regulate something, they can probably get away with cramming "in or affecting interstate or foreign commerce" in the law, secure in the knowledge that practically everything affects interstate commerce. I'm not sure where you got the idea that laws are passed exclusively to enforce rights protected by the Constitution. They are not. They are not passed primarily for that purpose. Such laws do exist (e.g. deprivation of rights under color of law, which was passed pursuant to the 14th Amendment), but they're protecting you from government infringement of that right.
tl;dr My assumption: the U.S. government is considering whether to accept refugees and immigrants (given your Syria comment). The background section talks about State attempts to restrict entry. The answer is nuanced since there are different standards for an entrance decision than there are for someone who is already in the U.S. This is because foreign nationals in their home nations aren't "persons within the jurisdiction of the United States," and so laws like the Civil Rights Act only apply in spirit. What does that mean? We wouldn't expect to see the federal government discriminate based on religion, but we might expect to see decisions made about groups that incidentally share an common religion. This is because the federal government has wide latitude when it comes to alienage---which is just a formal name for policies related to non-citizens. While religion is afforded a high degree of protection, the federal government's alienage policies are governed by the lowest level of judicial scrutiny. This implies a practical challenge: things like religion and national origin can be very difficult to disentangle from questions that pertain to the alienage category. For example, a policy might restrict some group's entry "because of" a particular alienage reason and "in spite of" the fact that most of the affected people happen to share a common religion. Background The Equal Protection Clause U.S. Const. Am. XIV § 1 prohibits States from denying any person within its jurisdiction "equal protection of the laws." The Clause is often applied to the federal government as well, via the Due Process Clause U.S. Const. Am. V. See, e.g. Bolling v. Sharpe, 347 U.S. 497 (1954). In relation to the clause, laws are reviewed for their constitutionality using either strict, intermediate, or rational basis scrutiny. Strict scrutiny would mean that in order to distinguish based on a particular trait, the government has to have a compelling, narrowly tailored interest, and no less restrictive alternative available. Rational basis just means the government's interest is subject to a lower level of scrutiny (e.g. benefits exceed costs, or don't let in felons). Things like, race, religion, national origin, and some forms of alienage are suspect classes that merit strict scrutiny. This bit about alienage is important. As we'd expect from the above, when States enact alienage statutes, they're subject to strict scrutiny, and when those statues cross the line, the courts have found that State attempts to restrict resident or non-resident aliens encroach upon the federal government's exclusive control over entrance of aliens. Graham v. Department of Pub. Welfare, 403 U.S. 365 (1971). In other words, the federal government, not the States, decides whether various "aliens" are admitted. Note: State scrutiny levels when dealing with undocumented immigrants may be context specific. See, e.g. Plyler v. Doe, 457 U.S. 202 (1982) (children and education). The federal government's authority over immigration is further solidified by the Supremacy Clause of the U.S. Const. Article VI. See Mathews v. Diaz, 426 U.S. 67 (1967). As such, the courts have applied rational basis scrutiny to the federal government's immigration policy. One reason alienage is interesting is that it tends to encompass things like national origin and religion. This doesn't imply the federal government makes its decisions on the basis of religion. In fact, it'd be hard to make an argument that they do. However, since the categories can be so closely entwined, many scholars have argued for a change in standard. Edit In hindsight, this topic seems quite forward looking. A couple weeks after the OP's question a U.S. presidential candidate (Donald Trump) came out in favor of a ban on entry into the U.S. by Muslims. That led to a flurry of activity, and to this insightful blog post by Professor E. Posner.
Note the following argument: the landmark 1819 case of McCulloch v. Maryland, which ruled that state officials cannot obstruct “the measures of a government [the federal government] created by others as well as themselves.” “In other words,” Kalt and Amar summarize, “a single state cannot use its power to derail the functioning of the United States.” (Amar is a Yale constitutional law professor, Kalt, his student) On the other hand, you have the argument by a Hofstra constitutional law professor that the 25th amendment can be applied when the President is occupied with a criminal case, ergo, the functioning of the United States can be carried on unimpared. At the end-of-the-day there is no absolute answer as it is still being argued academically and has never been specifically settled by the courts.