Normally, a person cannot be charged with a crime if the statute outlawing their behavior was passed after they committed it, states and Congress are barred by the US Constitution from enforcing such laws ex post facto. However, the reversal of Roe v Wade appears to create a situation where a person's performance of an abortion would be outlawed by established state law, but for the Roe decision. Can states now persue charges against people who violated state law prior to the recent SCOTUS ruling overturning Roe but after said laws were passed, if the person would otherwise still be liable for their violation (for example, the statute of limitations hasn't expired)?
The answer isn't clear, but Justice Kavanaugh's concurrence in Dobbs suggests that such a prosecution would be unconstitutional:
May a State retroactively impose liability or punishment for an abortion that occurred before today’s decision takes effect? In my view, the answer is no based on the Due Process Clause or the Ex Post Facto Clause.
Kavanaguh relied largely on the Supreme Court's decision in Bouie v. City of Columbia, 378 U. S. 347 (1964). There, black protesters were charged for trespass because they staged a sit-in at a diner and refused to leave when police told them to. They argued they couldn't be convicted because the state's trespass statute only prohibited entering land after being told not to, but the courts convicted them anyway, holding that the statute also outlawed remaining on land after being asked to leave, even though the statute said nothing like that.
The Supreme Court reversed the convictions, holding that "an unforeseeable judicial enlargement of a criminal statute, applied retroactively, operates precisely like an ex post facto law, such as Art. I, § 10, of the Constitution forbids."
By applying such a construction of the statute to affirm their convictions in this case, the State has punished them for conduct that was not criminal at the time they committed it, and hence has violated the requirement of the Due Process Clause that a criminal statute give fair warning of the conduct which it prohibits.
Bouie v. City of Columbia, 378 U.S. 347, 350 (1964).
But Kavanaugh's opinion isn't controlling, and Bouie isn't exactly on point, so the question remains open. The defendant probably has the more straightforward argument -- the abortion was legal up until Dobbs was decided -- but there's a pretty good argument for the state, as well: When Roe was still good law, abortion law was quite fuzzy, so it was never entirely clear whether new restrictions on abortion were or were not unconstitutional. Given those conditions, the state laws outlawing abortions were clear enough to provide fair warining, even if there were legitimate questions as to the constitutionality of those laws; if a woman wanted to do something contrary to the law, she should have petitioned the courts to invalidate it, rather than simply breaking it.
So there's no real way to say what the answer is at this point, but I suspect we'll get a real answer before too long.