Can there be ice in the core because of pressure?
what happens if you manage to add some water in the inner core or near it.

It will probably react with the solid iron to form iron (oxy)hydride:

Our observations indicate that H2O is likely introduced into the deep Earth through reaction between iron and water during the accretion and separation of the metallic core. Additionally, reaction between Fe and H2O would occur at the core‐mantle boundary, given water released from hydrous subducting slabs that intersect with the metallic core. Accumulation of volatile‐bearing iron compounds may provide new insights into the enigmatic seismic structures observed at the base of the lower mantle.

(source: https://doi.org/10.1002/2017GL075720)
In other words, the question of whether the water would be ice, liquid, or vapour is a non-question because water as molecules of H2O would cease to exist.
You don't need the core for this. Take water, put it on a piece of iron, and the water would be absorbed into the iron in the form of rust:
$\ce{Fe + 0.5H2O + 0.5O2 = FeOOH}$
Regarding the question of what would happen to just water if you would put it in core-like pressures and temperatures, the answer is simple: we don't know. I don't think anyone attempted that experimentally. It will probably not be a gas - pressures are way too high for that. Since the melting point of H2O is much lower than that of iron, I suspect it will be a liquid.
Something from the comments:

On quora, they said that high pressure would lower the melting point of ice, not as expected, probably making it vapor

This is only relevant at relatively low temperatures because of the anomalous crystal structure of ice. For most compounds, you need greater temperature to melt something which is at pressure. It's actually opposite for water, and closely related to the fact that ice floats on water (which is very counter-intuitive - usually solids are denser than liquids). But at high temperatures, of hundreds and thousands of degrees, water starts to behave normally under high pressure.