For online sports betting, patrons must be physically located within the state or jurisdiction to place bets on the state-sanctioned platform(s). Customers don't need to be a resident of the state where they want to place a bet. Many regulated sports betting sites operate in numerous markets.
Yes. There's nothing illegal about betting in a legal state if you're not from there. You just need to be within state borders. If you try to use a fake address, or the address of the people you're visiting, you'll run into issues verifying your identity, and likely won't be able to deposit and bet.