Ruling by Supreme Court would have budget implications for states that have lost billions of dollars in tax revenue during pandemic