There is another correct solution - "Co ti o sobě řekli". You cannot tell whether the speaker is talking about men or women.
Is there any difference between how "ly" and "li" sound in Czech? If not, then both the feminine and the masculine ending should be accepted in dictation.
Yes, there is a small sound difference between "ly" and "li". In case of need the difference can be emphasized by the speaker.
No, there is no difference and it is highly misleading for our learners to say what you are saying.
One can, when emphasizing the orthography, use some other I sound, narrower and wider and unnatural to Czech, but that does not mean there is any difference in i and y in Czech. The difference exists in Polish and dialects close to the Polish border may have this feature.