Can having one leg longer than the other have an effect on hip?

Yes. Having what call leg length discrepancy will shift the central of gravity of the body causing more stress on some part of the body more than other leading to early arthritis.