As mentioned in the other answer, there are two common definitions of DFA. One definition requires the transition function to be total, and the other allows it to be partial. The former one is somewhat more common.
Under the first definition, you need to include the additional state. Under the second definition, you don't have to.
Using Myhill–Nerode theory, it is easy to show that $n+2$ is the minimum number of states in a (total) DFA accepting the words of length between $0$ and $n$. Indeed, consider the words $\epsilon, 0, 0^2, \dots, 0^{n+1}$. These $n+2$ words are pairwise distinguishable. Indeed, if $0 \leq i < j \leq n+1$ then $0^j0^{n+1-j}$ doesn't belong to the language, but $0^i0^{n+1-j}$ does.
Using the "fooling set" method, it is easy to show likewise that $n+1$ is the minimum number of states in an NFA accepting the same language. Here is a statement of the method:
Let $L$ be a regular language. Suppose that there are $m$ pairs of words $x_i,y_i$ such that $x_iy_i \in L$ for all $i$, and for all $i \neq j$, either $x_iy_j \notin L$ or $x_jy_i \notin L$. Then every NFA for $L$ contains at least $m$ states.
We choose $x_i = 0^i$ and $y_i = 0^{n-i}$ for $0 \leq i \leq n$, in total $n+1$ pairs. Clearly $x_i y_i = 0^n \in L$ (denoting our language by $L$), whereas for $i < j$, $x_j y_i = 0^{n-i+j} \notin L$.