Yes, you can. Of course, I’ve heard some memory foam mattress salesmen say otherwise, but I think that is a legacy of old times. In those days, memory foam mattresses and toppers could turn into an inferno when exposed to a flame, and electric blankets could sometimes short circuit. It was obviously a bad combination, sort of like smoking in bed. Today, of course, all bedding products are legally required to go through flame retardant treatment, and electric blankets are much more reliable.
One possible issue could be if you set the temperature of your electric blanket too high. This might make your memory foam topper too soft to fully support your back. That is because memory foam responds to heat and pressure. Other than that, it should be fine to use an electric blanket together with a memory foam topper pad.