You, as a US citizen can do whatever you want - marry in the US or overseas.
However, it's not the same for your foreign girlfriend. If she goes outside the US, marries, reenters (she can be denied entry by CBP if they learn she's married to US citizen), then tries to adjust - this is the problem. She cannot enter the US with immigrant intent while on non-immigrant visa.
Unless you want to be separated for 2-3 years while she's goes through consular processing getting CR-1 visa, you should marry in the US, file for AOS and then you can leave on Advance Parole or better on Green Card to have big family celebration in Pakistan. You'd be legally married already but honoring tradition. Many people do it.