Can I install a sink with a drain pipe that's 21" off the floor?
If I'm understanding correctly, your drain pipe is coming out of the wall 21" from the ground?

That's fine, provided you can connect it to the sink properly.

Vanity height is anywhere from 29" to 36". The old "standard height" was 32", however often new construction uses kitchen height or "comfort height" at 36". 

A typical bathroom sink basin is from 5 to 9" deep.

A side view of the drain connection looks like this:



So if you have a 32" high vanity, with a 7" deep sink (outside dimension), that gives you about 4" for the tail piece connections, which is somewhat tight but should be enough room.

If you go to a 36" high vanity, you can do a deeper sink.



This doesn't directly answer your question about having drainage problems, however. What I'd be concerned about there is venting. For 1 1/2" pipe, there must be a vent within 3.5' of the trap:



I'm not sure what the status of your project is (eg, if you have access inside the walls to verify the plumbing), but it's easier to validate and fix this problem if necessary before you install a cabinet, sink, tile, paint, etc.