Under these circumstances, you will need to print and mail your return. The Internal Revenue Service will contact you and any other person who used your dependents SSN. They will ask for proof to substantiate who will get the dependent on their tax return.
The E-file system will not accept your return due to the error.
You can advise your dependent to file an amended return and remove the dependent from their return. That will take 12 weeks or so to process through the IRS. Your printed and mailed return will also take long to process.