The query you thought about:
var someAs = session.Query<A>().Where(someA => some.CollectionOfB.Any(someB => names.Contains(someB.Name)));
works fine, I tested it on a similar structure. NHibernate issues a correlated subquery containing an IN clause.
[edit] In regards to your comment, it's optimal in the sense that the intent of the query is clear from the code. Performance has to be measured and database engines use a query optimizer that can often translate ugly looking queries into very efficient ones, so, like many things, you can't judge a query on appearance.
I changed my sample query to use an inner join and got a better execution plan (it eliminated a sort operation). If I re-write the query using LINQ query syntax it uses the better execution plan but the query does not contain an inner join; instead it uses the older style join in the where clause.
var someAs = (from someA in session.Query<A>()
join someB in session.Query<B>() on someA.Id equals someB.A_Id
where names.Contains(someB.Name)
select someA).ToArray();