You can apply anywhere. If the school has a place there is no reason why your friend's dd can't have it. If she couldn't take the place straight away then it could be given to someone else who applies and who lives closer.
yep. dd1 went to school in a different county (juniors) because we weren't happy with the available schools in county (and the ok ones were oversubscribed). we just applied ans she was accepted in the normal applications round. if they've got a place and no wait list they will take anyone who wants to register. <shrugs>