I have a tender small lump in my right breast. Can it be aninfection or is it possible that it might be cancer?

Could be either. The lesion needs to be examined and if needed a biopsy, either open or needle biopsy may be needed. You may get away with a fine needle aspirate if that provides the diagnosis.
Ca 1st consideration. All breast lumps should be considered cancer until proved otherwise.
Lump and age. How old are you, if you have a lump , you must see your doctor.