Cell-free (CF) networks can reduce cell boundaries by densely deploying base stations (BSs) with additional hardware costs and power sources. Integrating a reconfigurable intelligent surface (RIS) into CF networks can cost-effectively increase the capacity and coverage of future wireless systems. This paper considers an RIS-aided CF system where each user is supported by a devoted RIS and can establish connections with multiple BSs for coherent transmission. Specifically, each RIS can enhance signal transmission between users and their selected BSs through passive beam-forming, but also randomly scattered signals from other non-selected BSs to users, causing additional signals and interference in the network. To gain insights into the system performance, we first derive the average signal-to-interference-plus-noise ratio (SINR) received by each user in a closed-form expression. Subsequently, we formulate an optimization problem aimed at maximizing the weighted sum-SINR of all users in the RIS-CF network. This optimization considers both BS transmit power allocation and BS selections as variables to be jointly optimized. To tackle the complexity of this nonconvex optimization problem, we develop an innovative two-layer iterative approach that offers both efficiency and efficacy. This algorithm iteratively updates the transmit power allocation and BS selections to converge to a locally optimal solution. Numerical results demonstrate significant performance improvement for the RIS-CF network using our proposed scheme. These results also highlight the effectiveness of jointly optimizing BS transmit power allocation and BS selections in the RIS-CF network.