Someone - I'm too lazy to look up right now who - said something along the lines of "Fantasy is anything I point to and call fantasy."
My personal definition:
Fantasy has something that cannot exist in any Earth, past or present, as we understand it: magic, telepathy, "impossible" creatures or beings, etc.
Science Fiction speculates on what could exist - past, present or future - with some basis in reality (theoretical or practical): alternate histories, tech advances/offshoots, aliens, medical advances/epidemics, etc.
The moment you introduce something provably impossible (as we currently understand things), it becomes fantasy, even if it's "science fantasy." But, then, that's just my personal definition - what I point to and call "fantasy" or "science fiction."
Publishers have their own definitions, based on what audience they believe will be more likely to buy a given story. So, McCaffrey's Dragonriders of Pern series - with telepathic alien-hybrid dragons who can carry impossible loads and transport themselves and passengers instantaneously between any two points in space and time - are sci-fi, while Jane Yolen's Pit Dragon Chronicles - with an alien species of dragon more or less right on the sapience line, bred by human colonists for pit fighting, with realistic physical limitations and only a touch of something like telepathy, far more plausible than Pernese beasts - are billed as fantasy. And some stories that are actually fantasy get lampshaded as "magic realism" and billed as mainstream or literary fiction, pitched at an audience that would turn up its nose at traditional genre but will find all sorts of wonderful things to say about it if they don't admit they're reading specfic...
As has been said, the boundaries tend to blur when you zoom in close. Can there be a biological basis for telepathy? Time travel - where on the spectrum does that fall?
Ultimately, it comes down to what you want to point to and call "fantasy" or "science fiction", unless you just go with "speculative fiction." If you publish traditionally, your publisher will likely get the final say. If you're self-pubbing, look at what the nearest comparable titles label themselves, and pitch accordingly.