In my game I draw a laser beam that has a vertical gradient by stretching a 1-pixel-wide graphic across the screen via the "grow actor"-block. The gradient is defined by the color of the pixels in the 1-pixel-wide graphic. Difficult to explain in text, but look at the 1-pixel graphic and the screenshot of the game and you will get it immediately.
I think you could do the same to draw your rectangle, using the 1-pixel-graphic in the proper height as you need it.