Developers have been told they can go ahead with a housing scheme in Lancashire if they provide funding for local healthcare.