Probably. Should be easy enough to test.
Android
A place to discuss anything related to Android or Android adjacent.
INFO:
-
No attacking others based on their phone preferences. Criticizing OEMs/devices is allowed. Attacking users because a different brand/device works for them isn't.
-
Obvious spam will be removed.
-
Anything directly or indirectly related to Android is allowed.
Check Out Our Partner Communities:
Have you tried using termux?
I've tried this on an old version of Android 10 and was unable to do so, I tested it by connecting two laptops to the hotspot and then trued to nmap each other IP addresses, they were unreachable.
I think the term you're looking for is isolated vlan in which each device on a network cannot see its peers, which is a common setting in (properly configured) public WiFi hotspots.
edit: oh, you want to access from the phone itself, I did not test that, but it should be easy to test with termux