We obtained high resolution (0.25 to 0.90) observations of HCN and HCO+ J=3-2 of the ultraluminous QSO galaxy Mrk231 with the IRAM Plateau de Bure Interferometer. We find luminous HCN and HCO+ 3-2 emission in the main disk and we detect compact (r<90 pc) vibrationally excited HCN 3-2, v2=1f emission centred on the nucleus. The velocity field of the vibrationally excited HCN is strongly inclined (PA=155 deg.) compared to the east-west rotation of the main disk. The nuclear molecular mass is estimated to 8e8 Msun with an average N(H2)of 1.2e24 cm-2. Prominent, spatially extended (>350 pc) line wings are found for HCN 3-2 with velocities +-750 km/s. Line ratios indicate that the emission is emerging in dense gas n=1e4 - 5e5 cm-3 of elevated HCN abundance X(HCN)=1e-8 to 1e-6. High X(HCN) also allows for the emission to originate in gas of more moderate density. We tentatively detect nuclear emission from the reactive ion HOC+ with HCO+/HOC+=10-20. The HCN v2=1f line emission is consistent with the notion of a hot, dusty, warped inner disk of Mrk231 where the v2=1f line is excited by bright mid-IR 14 micron continuum. We estimate the vibrational temperature T_vib to 200-400 K. We propose that 50% of the main HCN emission may have its excitation affected by the radiation field through IR pumping of the vibrational ground state. The HCN emission in the line wings, however, is more extended and thus likely not strongly affected by IR pumping. Our results reveal that dense clouds survive (and/or are formed) in the AGN outflow on scales of at least several hundred pc before evaporating or collapsing. The elevated HCN abundance in the outflow is consistent with warm chemistry possibly related to shocks and/or X-ray irradiated gas. An upper limit to the mass and momentum flux is 4e8 Msun and 12L_AGN/c, respectively, and we discuss possible driving mechanisms for the dense outflow.