Putting antibiotic ointment inside your nose does help prevent the flu somewhat because the antibiotic ointment would treat the bacteria and viruses that is getting in through your nose.
So the bacteria and viruses that enter your nose would be killed off which would prevent you from getting sick from that virus and bacteria coming into your nose.
But you can still get sick if the virus enters through your eyes or mouth so while the antibiotic ointment in your nose can help prevent the flu it will not prevent you from getting the flu entirely.
Always wash your hands often using antibacterial soap in as hot of water as you can stand and wash your hands more often if you or someone is sick in your home.