I've seen some images of long exposure photography with a polarizing filter. I was wondering if I could use an ND and a polarizer together. Will the polarizer have the same effect? Will the image quality be affected? Both filters are from the same manufacturer.
Absolutely you can. Many square filter holders are specifically designed for this:
The Lee Filters systems (Sev5n, 100mm) have optional front threaded rings designed to hold a polarizer in front of the ND filter(s).
The NiSi 70mm and 100mm square filter holders feature a specially-made thin polarizer filter meant to stack behind the ND filters, closest to the lens. The filter holder has a built-in thumbwheel to rotate the polarizer.
Formatt-Hitech's Firecrest square filter system also has a special polarizer mounted closest to the lens, with a geared polarizer rotation mechanism, just like the NiSi.
Cokin's P series filter holders has a slot to hold a Cokin P polarizer closest to the lens, like NiSi's. Cokin's EVO system has a threaded adapter plate to put any large-diameter screw-on polarizer in front of the stack, just like the Lee systems.
And if you don't go with a square filter holder system, you can always just stack screw-on ND filters with a screw-on polarizer.
Will the polarizer have the same effect?
Yes it will*. The ND filters do not polarize the light, unless they are also polarizing ND filters (there are a few of those, but they are not common).
* Caveat: I'm assuming you're not using variable ND filters. Variable NDs achieve their affect by stacking two polarizers in the same filter, that can rotate independently of each other. As they are rotated out of phase, the variable ND blocks more light from being transmitted. Stacking another polarizer in front of a variable ND can have weird consequences that are not intuitive at all (Bell's Theorem).
Will the image quality be affected?
Yes. But the affect on image quality might not be perceptible. Every glass or resin object in the optical path alters the light transmitting through it to one degree or another. Even UV filters, often so-called protection glass, has two air-to-glass interfaces, that can disperse light, cause reflections, etc.
Assuming high-quality filters, probably the largest impact to be concerned with is the increased potential for flare and reflections. Multiple parallel optical surfaces (such as the case when stacking filters), even with low-reflective coatings, are notorious for creating reflections. This can be mitigated to some degree, by managing the contrast ratio of light sources to the background in your image.
If you think of filter quality as some theoretical metric that can be distilled to a single number from 0% (complete loss of quality) to 100% (absolutely perfect, no loss of quality), three 80%-quality filters combine to produce 0.80 × 0.80 × 0.80 = 51.2% combined quality. But three 95%-quality filters combine to produce 85.7% effective quality.
As you move down the filter quality range, as you stack filters, the quality problems increase quicker. Optical aberrations due to low-tolerance low-precision glass (or worse, plastic) creep in. Roger Cicala, the founder of Lensrentals.com, has a couple of articles about stacking filters (he focused on the effect of simple UV filters, but the same principles apply to all filters in the optical path):
In Good Times with Bad Filters, Roger and crew stack an absurd amount of UV filters, just to see what the impact will be. They also compare slightly more reasonable (!) stacks of 5 of the best UV filters with 5 of the worst UV filters, to show the cumulative effect of high and low-quality filters.
In Yet Another Post About My Issues with UV Filters, Roger demonstrates the effect of a poor quality UV filter as tested with their $500k test bench, OLAF.
Regardless, as long as you do your research and buy high quality filters and polarizers, I wouldn't worry about any theoretical loss of image quality. If it happens, it happens. So be it. You will learn what situations work better or worse with the combinations your kit (lens + ND + polarizer + sensor) can create. There are some shots that can only be obtained with polarizers. There are some shots that can only be obtained with ND filters. And there are some shots that can only be obtained with a combination. Would you rather have those shots, working your equipment to achieve the best they can produce, or would you rather not have the shots because the results might be less than perfect?
Such are the tradeoffs in photography, always.