Yes, a vector can have zero components along a line and still have a nonzero magnitude.
Example: Consider a two dimensional vector . This vector has zero components along a line lying along the Y-axis and a nonzero component along the X-axis. The magnitude of the vector is also nonzero.
Now, magnitude of =