Can a bacterial infection delay the periods?

Yes it can.

Many reasons such as stress or infection can effect on periods. You can read about this here.