No. An anti-tank rifle is supremely unsuited to AA: it doesn't have the ability to flood the sky with bullets, or provide mid-air explosions, either of which was usually required to take out a plane. Specialised AA was thus done by autocannons or sorts of specialised artillery, although regular machine guns could also be effective if the planes were low enough.
Funnily enough that
is what .50 BMG was designed for, AA. Granted it was designed when planes were wood and paper, but still. It's still used today for AA. Granted at this point it's only going to be useful against helicopters and the like, but still. You might get lucky against a low flying jet.
I agree with Hipsters. An anti-tank rifle is just an anti-materiel rifle from the days when they could penetrate tanks. The basic concept is the same today as it was then: penetrative power against an armoured target where normal firearms would be ineffective. No-one uses old WW2 AT rifles just because newer, better ones were created - in much the same way effectively no armies are still equipped with Kar98s or Lee-Enfields.
Well no, there are no anti-tank rifles anymore, and an anti-material rifle can't penetrate tank armor. Anti-tank back then was indeed
anti-tank, for disabling tanks. They could be used in anti-material roles, heavy things other than tanks, but they were meant for tanks.
Conversely today, there are anti-material rifles, but they can't be used effectively against tanks. There is no man-portable rifle today that's useful against contemporary tanks. Going back to something else Hipster brought up that I largely skated on, he mentioned using hunting rifles to snipe and vice-versa. That's slightly more accurate than saying anti-material rifles are anti-tank rifles, but realistically you will never expect a Steyr Scout (a dedicated hunting rifle) to pull off the 3km+ shots that snipers can get with a properly designed sniper rifle using a proper sniper round. To an extent a gun is a gun, but also guns are absolutely not interchangeable, rounds are not interchangeable, and not all guns can perform in all roles. Anti-tank is a very very specific role, and it's not useful anymore.
That being said about hunting rifles, the current record sniper kill was made with a rifle that weighs 12 kg while the Steyr Scout weighs 3 kg, so I know which one I'd want to carry around all day looking for a deer.