Yes, if your bag is smaller than 16” x 16” x 8”, about the size of a school backpack. Hard-sided coolers are not allowed at Petco Park. Your bag will be subject to search when you enter.
See also: what else you are allowed to bring
You may also enjoy: