Can I do this

I have a 4 year old and I’m currently pregnant with another baby so I think they have the same father but he passed and I want to know if they do. Can I get a dna test with just them 2 to see if they have the same dad. His family is far away and I’m not talking with them I need to know for sure if he’s the father because I want to name the baby after him and the other guy I slept with just ghost me