There is no such law.
Years ago, when I first tried to open a savings account with Siam Commercial Bank (SCB), they asked for a work permit, which I did not have, claiming it was the rule.
I insisted on seeing this rule and a lawyer who happened to be next in the queue behind me supported me. The bank employee had to call head office for it, got it by fax, and when I read it, it was clear that their rule applied only to current accounts, aka checking accounts for which cheque books are given, not to savings accounts. The bank lady still refused to open the account for me.
I walked down the road to another branch of the same bank and got my account without a problem.
It is possible and probable that the bank rules have changed since then to apply the work permit rule to all types of accounts.