There probably isn't enough ice left on Mars to fill oceans. Nobody is quite sure what happened to it, but it may have been lost to space through dissociation of water to hydrogen and oxygen. The hydrogen being light is then lost to space and the oxygen is what turned Mars red.l
Some of it may have sunk deep below the surface into the deep hydrosphere.
But there is enough ice there for lakes. The equatorial regions are dry to great depths. But there's lots of ice at the poles. Also CO2, enough to warm it up a fair bit, enough to double the atmospheric pressure which would make water stable over large areas of Mars, though it would still be only 2% of Earth's pressure, and some think it might have a lot more CO2 than that.
And there are water carved gullies on Mars which formed in the recent past (many formed by dry ice but others thought to be water formed), which suggests that at times in the past that doubling of atmospheric pressure happens - depending on variation in the orbital eccentricity and axial tilt, both of which vary much more for Mars than Earth.
If we try to terraform Mars right now, then because it is further from the Sun than Earth, then you'd need to compensate for the lack of sunlight to keep it warm enough for, e.g., trees to grow.
You need to double the amount of sunlight, perhaps by using large thin film mirrors the size of a planet to reflect light onto it. Or by production of greenhouse gases constantly to keep the planet warm. Huge quantities there, you are talking about mining cubic kilometers of fluorine per century to make greenhouse gases, for as long as you keep the planet habitable. Or maintaining your planet sized orbiting thin film mirrors for the indefinite future. Because we don't know any other way to keep it warm enough for trees. And a breathable atmosphere is especially challenging as humans can only tolerate up to about 1% of CO2 in the atmosphere - beyond that it is poisonous to us. We need a buffer gas like nitrogen in large quantities also (or can survive in a pure oxygen atmosphere but that's a fire hazard, many materials would burn in pure oxygen that do not in an atmosphere with a buffer gas).
When the sun warms up, then the same thing would happen naturally. So, if it hasn't lost all its ice by then by other processes (e.g. by humans trying to terraform it and it then losing the water again) - then it would become habitable briefly. For plants anyway - perhaps. Whether it has enough nitrogen to make a breathable atmosphere for humans is another matter.
But the chances there are still humans around 500 million years from now must surely be fairly low. Even if there are beings evolved from us, a lot surely would change over that time period. It's long enough for humans to evolve a second time from tiny microscopic multicellular creatures and worms.
So, I think a bit hard to say if it would be habitable for whatever beings are around then. They might not need oxygen. Or who knows, maybe they need methane or hydrogen sulfide or whatever.
But it might be habitable briefly for plants, and some other creatures, as the sun warms up. Maybe it would be a useful "stepping stone" on the way - later on Mars also would be too hot and Jupiter's moons might be the place to be. And anyway, Mars would surely lose its water again, as it did before, what little is left. But who knows, it might provide a useful temporary oasis for a few million years for some future beings as the sun warms up.
Also it's always possible that at some time between now and then, that some Earth evolved intelligent beings, not necessarily us, find a way to make Mars permanently habitable for them - either using ideas we don't have yet, or because they need to adapt it for a biology different from us, which for some reason is more easily able to survive on Mars.
PAST HABITABILITY OF MARS AND VENUS
As for habitable in the past - Mars very probably had oceans in the past, we have good evidence of that. And Venus may well have been habitable also. It is hard to say for Venus because it had a global resurfacing event a few hundred million years ago - we can tell because there are very few craters on Venus, even taking into account its thick atmosphere which disintegrates incoming meteorites right up to 1 km in diameter. Still it should have more of the very large craters.
One hypothesis is that since it has no continental drift, no sign of it - that therefore the only way for the heat inside to escape is that it builds up over hundreds of millions of years, and then the crust gets so hot from below that volcanic eruptions happen everywhere, resurfacing the whole planet.
But early in the solar system, it probably resembled Earth with seas, and an atmosphere resembling early Earth. If so, since life started on Earth very early on, it may well have started on Venus also.
It's going to be hard to find evidence. But perhaps there are ancient meteorites from Venus on the Moon. We don't have any meteorites from Venus on Earth - but our meteorites tend to be recently ejected, up to twenty million years or so ago, and it would be almost impossible for an impact into Venus to first hit the surface at all - needs to be 10 km in diameter for that - but then to eject material into spacer with escape velocity. Perhaps though during the late heavy bombardment when there were still hundreds of kilometer objects impacting other planets, even thousands of kilometers diameter for our Moon formation event - then maybe they impacted on Venus also, seems likely.
And on Earth as well of course but it would have fallen onto ancient Earth covered in oceans, and been processed through continental drift here and be hard to identify.
We do have some meteorites that some scientists think could come from Mercury, though there are other possible sources and it's had to be sure without better understanding of the composition of Mercury. Angrite But theoretically we should get meteorites from Mercury. Page on arxiv.org
Perhaps some day we will find meteorites from Venus on the Moon or elsewhere and be able to fill in some of the gaps in Venus' geological history.
Life could also have originated on Venus, for all we know, it could have originated on any of Earth, Mars, Venus, or on the earlier protoplanets that later merged to form them. Meteorites from Other Planets