Probably. We’d have to know what video card you have in your Mac to answer for sure.
Actually, before you tell us, look at the back of the computer. Are both ports on the card the same? Look at this photo:
https://www.macway.com/images/products/CARATI0010_3.jpg
The one on the left is DVI, the one on the right is ADC. If you have two DVIs, go for it. It’s very possible, however, you have one of each like the photo. If so, it will still work, but you’ll need an “ADC to DVI” adapter. It’s $29 at Apple.com
Well, before you buy anything, go to the Apple Menu in the upper left and select “About This Mac.” Then click on “More Info.” Select “Graphics/Displays” and tell us what the bolded card name is on the top. I’m nearly positive that any card you could have will support dual-monitors, but you might want to tell us what you’ve got just to be extra certain.