Foreign law firms will be allowed to establish offices on the ground for the first time in one of the world’s biggest economies.