Depending on the recipe and procedures, there will be no discernible difference.
So, yes, you can use whole eggs for this type of recipe. I was trained to do this by a well respected chef, and I still use whole eggs for several of my egg based items (eg. Creme Anglaise, Creme Patissiere, etc).
Here is an example recipe that appears to be quite safe in its procedures which can easily be applied to your recipe:
https://www.melskitchencafe.com/the-best-vanilla-pudding/
Personally, I would use them at ratio 1:1, so as your recipe has 3 eggs yolks I would use 3 whole eggs.
For procedures:
- After heating the milk, split the hot milk in half amounts.
- Temper the whisked eggs (that already have some cold milk mixed with them) by slowly whisking in one half of the hot milk, and put the egg mixture aside.
- Cook the remaining half of the hot milk with the cornstarch and sugar (etc).
- Once the cornstarch mixture has thickened and simmered for several minutes, while whisking, slowly add it to the tempered egg mixture.
- Put the complete mixture back on the stove over moderate heat.
- While stirring to ensure the mixture doesn't stick to the bottom, raise the temperature of the mixture until you can see faint wisps of steam above the mixture (this could be difficult to see).
- Once you see the faint wisps of steam, you must be careful as this is the point where the eggs will begin to thicken.
- Cook the mixture without scrambling the eggs. (So just light bubbling simmer is enough, no need to try to boil profusely)