Kurz vor seinem Tod hatte ihn sein Vater gebeten: »Kümmere dich um deine Mutter, Sohn.«
I would have thought the dative case would be used for that pronoun, but I find it written this way in a book. Is that standard?
1.
Make sure that you use and mean the right verb:
The word »gebeten« is participle II of »bitten« (to ask for something, to request, to beg), not of »beten« (to pray). I corrected this in the title of your question. (It was »jemand etwas beten«.) Participle II of »beten« is »gebetet«:
Ich werde meinen Chef um mehr Gehalt bitten.
I will ask my boss for more salary.
Ich werde zu Gott für Frieden in der Welt beten.
I will pray to God for peace in the world.
Ich habe meinen Chef um mehr Gehalt gebeten.
I did ask my boss for more salary.
Ich habe zu Gott für Frieden in der Welt gebetet.
I did pray to God for peace in the world.
2.
The verb bitten (to ask for something, to request, to beg) must have at least one of these two objects:
Your sentence has just the accusative object (ihn), the prepositional object is not used.
The verb beten (to pray) is an absolute verb. This means that it can't have any objects but prepositional objects. So it can't have an accusative object, it can't have a dative object and it can't have a genitive object.
You can use it without any object or with any number of prepositional objects:
Walter betet.
Walter is praying.
Walter betet zu Shiva.
Walter is praying to Shiva.
Walter betet um sich besser zu fühlen.
Walter is praying to feel better.
Walter betet für seine Mutter.
Walter is praying for his mother.
Walter betet um sich besser zu fühlen zu Shiva für seine Mutter.
Walter is praying to feel better to Shiva for his mother.
3.
The only pronoun in your sentence that needs dative case is vor. And the nominal group that is dependent from this pronoun is »seinem Tod« which correctly is dative case.
4.
Note that NEVER the whole sentence is in a certain grammatical case. Only parts of it (the subject and the objects) have individual cases, not the whole sentence.
The subject is always in nominative case, and some verbs need 2 objects in 2 different cases. The verb geben (to give) is one of these verbs:
Die Frau gibt dem Mann einen Ball.
The woman gives a ball to the man.