What you want to do is draw an arrowhead only when you reach the last element.
Unfortunately, as discussed in How to get the number of elements in a \foreach loop?, \foreach has no built-in mechanism to a priori determine the total number of elements that are passed to it; therefore, it has no way of detecting that it has reached the last element at the time it processes it.
You have two alternative approaches, here.

1 - Draw the path in reverse
Reverse the list you pass to \foreach (make the end point the start point) and draw an arrowhead only "at the beginning" (when \i=2).
\documentclass{standalone}
\usepackage{tikz}
\makeatletter
\newcommand{\drawline}[4][]{
\foreach \v [remember=\v as \u,count=\i] in {#4} {
% draw an arrowhead only if we're processing the second element
\ifnum \i = 2%
\tikzset{tip/.style={<-}}%
\else
\tikzset{tip/.style={}}%
\fi
% the rest of your for loop
\ifnum \i > 1%
\ifodd \i%
\draw[tip,#1,#3] \u -- \v;
\else
\draw[tip,#1,#2] \u -- \v;
\fi
\fi
}%
}
\makeatother
\begin{document}
\begin{tikzpicture}
\drawline{solid,color=blue}{dashed,color=green}{(5,1),(8,-1),(5,5),(2,3),(1,1),(0,0)}
\end{tikzpicture}
\end{document}
2 - Count the total number of elements beforehand
Count the number of elements first, then set up a test in the body of your \foreach loop to detect whether the last element has been reached, and only draw an arrowhead in that case.
\documentclass{standalone}
\usepackage{tikz}
\newcount\foreachNumel
\makeatletter
\newcommand{\drawline}[4][]{
% count the number of elements in #4
\global\foreachNumel=0%
\foreach \v in {#4}
{\global\advance\foreachNumel by \@ne}
\foreach \v [remember=\v as \u,count=\i] in {#4} {
% draw an arrowhead only if we're processing the last element
\ifnum \i = \foreachNumel%
\tikzset{tip/.style={->}}%
\else
\tikzset{tip/.style={}}%
\fi
% the rest of your for loop
\ifnum \i > 1%
\ifodd \i%
\draw[tip,#1,#3] \u -- \v;
\else
\draw[tip,#1,#2] \u -- \v;
\fi
\fi
}%
}
\makeatother
\begin{document}
\begin{tikzpicture}
\drawline{solid,color=blue}{dashed,color=green}{(0,0),(1,1),(2,3),(5,5),(8,-1),(5,1)}
\end{tikzpicture}
\end{document}