I got my nose pierced 3 months ago and now I have a bump next to the piercing. Could it be infected?

YES. Indolent infections in this area are often from staph infections. Removing the piercing appliance, cleansing with peroxide, moist hot compresses, and neosporin ointment type topical antibiotics may be enough. If worsening, see md for stronger antibiotics.
Possible. Any piercing has the potential to get infected at any time. It may be a a type of cyst or reactive dermatitis. Either way, to know for sure, have a dr. Look at it and get an official DX for the apprpriate treatment. Best wishes.
Possible. Check for redness or pain at the site or any form of discharge. They will be signs of infection. And also there may be a possibility of "blowouts". First apply some topical antibiotic ointment (if you have none of the above symptoms). If bump persists by next week, see a physician.