If a player in possession narrowly dodges a very reckless and dangerously attempted tackle, but ends up losing the possession, will this still be ruled a foul despite no contact being made?
Law 12 (here) point you in the right direction about this:
Group of Six:
- kicks or attempts to kick an opponent
- trips or attempts to trip an opponent
- jumps at an opponent
- charges an opponent
- striker or attempts to strike an opponent
- pushes an opponent
Anyway, referee has the option to allow the play to continue, and when the play stops, take a disciplinary measure (like a yellow or red card).
Remember that everything that happens in play, is judged by the referee.
The rule clearly states about the attempts, so missing the tackle could be interpreted by the referee as a foul.