The idle control solenoid should ONLY affect how the car "idles" when the AC is on. Not how it runs going down the road. When you say it loses power while you're driving, I cannot help but assume there is something else going on? If however it is when you are returning to idle while driving that it loses power then, yeah, => idle control solenoid.
Now, a really poorly running engine can be noticeably affected by the AC compressor running or going up a hill or 4 passengers instead of one etc as they are all increased load. Not being a smart *ss here as I don't know your experience with cars or skill level, OK? That said, my still low mileage [9] 307 didn't notice the AC much and my big block doesn't notice it at all other than me hearing the click.
Crappy picture but this . . . you should see this pop out and back when the AC comes on and off to bump up the idle speed. You can adjust it to set just where it works well for your setup?