Plecos have been know to suck on goldfish, killing them. So it's not a good idea to put them together in the same tank.
10 gallons is ok for a juvenile goldfish, but 20 gallons (or more) is recommended as a permanent house for 1 goldfish, because when full size they need room to turn around and swim. And you don't want their growth to be stunted by the small volume of water, because it causes health problems and shortens their lifespan.
The 10 gallon tank probably looks big since this is your first fish, but when you start looking at other tanks, 10 gallons starts to look really small.
Remember to keep an eye on your water parameters so the tank stays cycled.
Good luck and I wish you and your fish a happy life
