I was under the impression that by ww2 anti tank rifles were rendered all but useless by advances in tank design. However I am reading Antony Beevor's Stalingrad and there are many instances of Soviet troops using anti tank rifles to good effect against german forces.
More can always be said on the matter; for the meantime, there's a post by u/TankArchives on just this matter that directly relates to your question, with bonus material linked below.