Yes, you can teach discipline.
Discipline = time + repetition +practice + proper instruction
The issue isn't not being able to teach discipline. The issue is do you have the TIME to see it through.
A dumb person can become smart, but it may take time. And, unfortunately, time is a commodity that is precious. Everyone doesn't have the same amount of time to instill discipline. So if you have a stupid player who needs 10 years to unlearn bad habits, the coach may not have that much time, nor the player.
But you can teach discipline.