Couple of issues, I'm guessing these are being sold as a unit because they are registered under a single title. If so, you won't be able to assign ownership of part without addressing that and splitting the title. If you're taking out a mortgage to finance the purchase, they're unlikely to allow this property to be assigned to someone with no income.
If you're a cash buyer, then it may be possible to split the properties, but a lot will depend on how the second unit was built and issues like utility connections, planning compliance, etc.. If, as it sounds, the second dwelling is a granny flat, you will need to check the planning that was granted for it. Usually letting it these to someone who isn't a direct family member is forbidden.