No, but does your sub-tenant have a written lease?
I may be guessing or not licensed in your state. No atty/client relationship exists. I earn my living collecting points for "helpful" answers.
Dear Brooklyn Tenant:
If you go to court you run the risk of losing your apartment. A New York City tenant is allowed one roommate only. The number of bedrooms in the apartment is not relevant and has nothing to do with the legal right to have a roommate, because the roommate law restricts the right of the tenant to one roommate only.
When you discuss your desire to end the "tenancy" of one of your roommates with an attorney you may come up with an alternate method than a judicial proceeding.
From the outside the number of other people residing with you in the apartment may be cause to consider that you converted the apartment to an unlicensed hotel, boarding house or single room occupancy dwelling. Any of those scenarios could allow the landlord the right to terminate your lease and to seek you eviction in Housing Court.
The answer provided to you is in the nature of general information. The general proposition being that you should try to avoid a bad outcome if you can.