suppose a company Foo.xx in country X (operating a LIR xx.foo) wants to start up a daughter company in country Y, where it will need a new AS.
You can apply for AS numbers as long as you meet the criteria set for this. As far as I remember the networks need to have distinct routing policies and be multihomet with more than two networks for this to be necessary.
Can LIR xx.foo request a new allocation and a new ASN for use by the new daughter?
Yes.
or Does it need to establish a legal entity in country Y, start up a new LIR yy.foo, and have yy.foo request a new allocation and ASN ?
As far as I can see the only reason you would want to do this would be if you require yy.foo to operate its own address registry. And even then you may not need to do that. -hph