All PCI-Ex16 graphic card will physically fit within the PCI-Ex16 expansion slot. However, PCI and PCI-Ex16 are not interchangeable. You cannot put a PCI card into a PCI-Ex16 slot, nor vice versa.
The type of video memory a card has is not important when it pertains to compatibility with the rest of the system. However, if you have the option between otherwise identical cards, go with the card that has the newest memory (from newest to oldest (G)DDR5, (G)DDR4, (G)DDR3, (G)DDR2, (G)DDR).
The real concern about adding a graphics card to a system is the power supply. In many off the shelf systems, the power supply is less than ideal for adding a graphics card and often, a new power supply needs to be purchased as well as the new graphics card.
If you could give us the full specifications (component model numbers, or if off the shelf, manufacturer and model number) as well as a budget, we could help you better.
-Wolf sends