The answer to that question depends on the grading of the DUI for which you were convicted.
If you are convicted of a DUI that is graded as an ungraded misdemeanor (M) or a misdemeanor of the second degree (M2), then yes you can own or possess a firearm.
If you are convicted of a DUI that is graded as a misdemeanor of the first degree (M1) or a DUI graded as a felony of the third degree (F3), then no you would not be able to own or possess a firearm. In other words, it would be illegal for you to possess a gun owned by someone else in addition to personally owning a firearm.
If you received an ARD disposition for a DUI, then yes you can own or possess a firearm. Sometimes a condition of ARD is that you do not possess a firearm. In that case, you would not be able to possess your firearm until your ARD supervision was over.