If you only buy securities and don't borrow cash (leveraged purchases) or securities (short sales) you should be fine. Note that some jurisdictions impose more constraints on brokers (for example UK/US) and impose more protection for the customers. The bottom line is: you should read the contract between you and the third party because that is where the terms of your relationship are defined. You can also ask the broker if they are allowed to use your assets and to what extent.
For margin accounts for example, you generally have rehypothecation terms similar to:
Bank XYZ is authorized by Customer to lend to itself or others Customer securities or assets. Bank XYZ may, without notice, pledge, re-pledge, hypothecate or re-hypothecate Customer securities and assets, separately or together with those of other customers for any amount due to Bank XYZ.
That basically says that the bank/broker is allowed to take assets (cash, securities) from your account and use them as they wish. In the event of a bank default, you will probably not get all your money back, and if you get some back, it will take time (possibly years).
Those rehypothecation terms are generally conditional to your borrowing cash or securities from the bank/broker (the "for any amount due to Bank XYZ" part of the quote above).
See also this post for more details regarding counterparty risk.