They can't "cancel" your visa, but they can fire you - you're probably an at-will employee. If that happens after approval but before you are to start with Company B, see if you can get Company B to move up your start date so you remain eligible to remain in the U.S.