A PhD will, all other things being equal, make you more competitive. However, I would strongly advise you not to do a PhD just to increase your competitiveness for residency or fellowship. Do it only if you really like research. Otherwise, you will be miserable during your PhD.