Both. If they membrane bound or within the membrane then they function in some sort of intracellular function ex. Intracellular trafficking. If they are inside the ER then can be directed for extra cellular secretion ex. Hormones or antibodies etc.
Proteins synthesized at the rough ER are either bound for the nucleus or outside of the cell. Everything else is made by free ribosomes in the cytosol.