We have developed a wavefield separation filter for borehole acoustic reflection surveys (BARS) that uses parametric decomposition and waveform inversion, which we call the PWI filter. A BARS survey uses a sonic logging tool in a fluid-filled borehole to image near-borehole structure. Signals from a monopole or dipole source are reflected from geologic interfaces and recorded by arrays of receivers of the same tool. Because amplitudes of direct head waves and borehole modes are significantly larger than those of the event signals, wavefield separation to extract the event signals is crucial for BARS processing. The PWI filter estimates the direct head waves and borehole modes using the parametric decomposition, which is based on a 1D wave propagation model in the frequency domain. The wave-propagation model is calibrated using waveform inversion, which solves for the slowness and attenuation of the waves. The inversion is regularized using the assumption that the slowness and attenuation smoothly vary with frequency; the nonlinear system of equations is iteratively solved using the Newton method. An example of wavefield separation is shown for field data for a very fast formation for a monopole source. After using the PWI filter to separate the S-waves and direct and reflected Stoneley waves, we obtain the final filtered waveforms by further applying a median filter to separate the residual waveforms, which are not separated by the PWI filter.