In my textbook, submanifold is defined as follows: If $X$ and $Y$ are both manifolds in $\mathbb{R}^n$ and $Y\subset X,$ then $Y$ is a submanifold of $X.$
I think that the topology of $X$ and $Y$ should not be irrelevant and some sort of condition such as "the topology of $Y$ is the subspace topology" is needed. In addition, I think that not only such a topological condition, but also a condition which is relevant to the smooth structures of $X$ and $Y$ is needed.
What is the correct definition of submanifold?
There are two definitions of submanifolds. And sometimes, the word "submanifold" is qualified as either "immersed submanifold" or "embedded submanifold". The textbook definition you have given defines what is called the "immersed submanifold". If the topologies match up (as you would like to have), such submanifolds are said to be "embedded/imbedded".
Look up the textbook by Guillemin and Pollack for a nice example showing the difference between the two definitions (Figures 1-8 and 1-9 on page 16, to be exact)