It is possible to have multiple versions of Xcode on your Mac. Where you may have trouble is getting your command-line to work well. Various develper tools are in the developer directory. When there are multiple versions of Xcode on a Mac one of them should be selected.
Printing the path for the developer directory will show which copy of Xcode is currently selected.
xcode-select -p