The relevance of GramSchmidt here is that it's based on the same trick that the OP needs to use. E.g. when you have found two of the vectors in the orthonormal basis you're constructing, GramSchmidt tells you how to take a vector that isn't in the subspace spanned by the first two basis vectors and use the three vectors to construct a third basis vector that's orthogonal to the first two.
If you want to find a vector that's orthogonal to the subspace U of the vector space V, then pick any vector x in V and let y be its projection onto U. xy is orthogonal to U.
