Of course it’s legal, and many traders do just that – especially traders with large account balances who want to spread their “broker risk” among two or more brokers.
Hedging is not an issue here.
Hedging is prohibited only in the U.S. within a single account. That is, you can’t be both long and short the same currency pair in the same U.S. account.
You can be long in one U.S. account, and short the same pair in another account with the same U.S. broker, with another U.S. broker, or with an offshore broker, without violating any regulations.
Generally, what you do in one account has no bearing on what you do in another account, except for attempts at broker arbitrage (which is not the issue here).