You haven't said where exactly this alpha mask comes from or how you generate it. It could be a static alpha mask from a texture or something you build in the framebuffer.
If it comes from a texture, you can do this easily with shaders, or even just texture environment multitexturing. You set the image being "rescaled" as one texture and the alpha mask as the other (as a GL_INTENSITY texture, or GL_RED if you're using core GL 3.1+). Take the RGB from the main texture, but the output alpha should come from your mask texture. Then alpha blend/test/etc as normal.
If the alpha is something you have built into the framebuffer, then it's simply a matter of using the correct blend parameters. There are GL_SRC_*
blend parameters, but there are also GL_DST_*
blend parameters. You're looking for something based on GL_DST_ALPHA
and GL_ONE_MINUS_DST_ALPHA