So you can pixelate an image by drawing it on canvas like this:
/* css */
.pixelate {
image-rendering: optimizeSpeed;
image-rendering: -moz-crisp-edges;
image-rendering: -o-crisp-edges;
image-rendering: -webkit-crisp-edges;
image-rendering: crisp-edges;
image-rendering: -webkit-optimize-contrast;
image-rendering: pixelated;
-ms-interpolation-mode: nearest-neighbor;
}
// js
var canvas = document.createElement('canvas')
var context = canvas.getContext('2d')
context.webkitImageSmoothingEnabled = false
context.mozImageSmoothingEnabled = false
context.msImageSmoothingEnabled = false
context.imageSmoothingEnabled = false
I'm wondering if there is a way to then figure out where the squares are in the canvas, and what colors they are, so that you can do things with them like (in this case) animate them so it looks like they are sparkling, or perhaps simpler just to animate them back and forth like a wave.

I'm afraid it's not possible with the pixelate 'library' due to how it creates the pixelation. It simply stretches a scaled down version of the original image using the original width & height - so there aren't any individual rectangles.
You can do this on your own however. Basically you have do determine a pixelSize for your mosaic - e.g. 16. Now loop over the complete image and get the color of a single 1x1 pixel at screen coordinates that are a multiple of the pixelSize. Finally store every pixel position, it's size and the color in an array.
Now you can loop over the array and draw the individual rectangles to a canvas or animate them as you like.
Here's an example: