Yes, a non-resident with a U.S. brokerage account from which taxes have been withheld is eligible for a refund.
Firstly, tax withheld on capital gains can be recovered, allowing you to claim a refund.
Secondly, if you received dividend income in addition to capital gains, you might be eligible for a reduced tax rate if your country of residence has a tax treaty with the U.S.
To help you claim this refund, TFX can assist you in filing a non-resident U.S. tax return (Form 1040-NR).
Filing a standard 1040NR form costs $500 (including one W-2). Each additional form (W-2, 1099, 1042-S, etc.) costs $50.