Yes, this should work. But there are also SSID dependent settings like firewall rules that can restrict the communication.
And do devices receive IPs in the same subnet after connecting to these two SSIDs?
If you found this post helpful, please give it Kudos. If my answer solves your problem, please click Accept as Solution so others can benefit from it.