API to know if bitcoin-core has the private key (in the wallet.dat file) of a certain Bitcoin address?
Use validateaddress [address].

It will give you all information about that address, including whether it has the private key (it will "ismine" : true and "iswatchonly" : false.