The teething in babies doesn't actually cause the diaper rash directly but teething can trigger diaper rash due to the fact the baby has loose stools and diarrhea which can cause diaper rash if the baby is prolonged to the exposure of the poop and urine.
Be sure to apply diaper rash cream to your baby and change the diapers often especially when they're having diarrhea.
When a baby is teething they also have a decreased appetite, runny nose, increase in Saliva and irritability.