Top-ranked Elena Rybakina avoided a major upset as she was pushed to a deciding set by qualifier Katarzyna Kawa in the quarterfinals of the Ningbo Open.