Sort of yes, sort of no.
For example, imagine an American tourist visiting the UK drives dangerously and kills a motorcyclist, then escapes to the US before being caught.
A UK criminal court can order jail and a driving ban, but has no way to enforce the sentence unless the tourist decides to return to the UK, or the US decides to extradite.
A US criminal court can't do anything, the crime took place outside of their jurisdiction.
The victim's family can sue the tourist in a US civil court, and that court can take UK law into account - but can basically only impose a cash settlement that gets paid out of the tourist's insurance. They don't actually lose a cent.
So in a sense one state's courts can apply foreign state laws. But in terms of results, i.e. days spent in jail, laws don't appear to apply across borders.
In American law, a "foreign state" is a term of art meaning another U.S. state or territory. It does not mean a foreign nation like the UK. International law is a whole other ball of wax, as you suggest.