The error message you’re encountering is to prevent common modeling errors that can lead to undesirable results.
One solution is to place a Zero Order Hold (ZOH) block with a sample time of “-1”. This converts the continuous sine wave output to a value that is sampled every major time step, which is an appropriate input to the Memory block. The ZOH in this configuration does not introduce a delay, but rather will correctly represent that the value is constant between simulation steps. The only effective difference will be in the scope that you will see the staircase like discrete waveform instead of the interpolated continuous waveform.