I am not sure why you were given that advice but the only way to e-file is to take that dependent off your return. You would go to the Personal Info section, go to Dependents, click Edit on the dependent to remove, then choose delete.
If you have the right to claim the dependent, then you would have to mail in your return with the dependent on your return. The IRS would then contact both parties who claimed the dependent, once they determine who had the right to claim the dependent, that return would go through claiming the dependent.