Yes, children can inherit their mother's name based on the need for succession. The Hornwood discussion in Clash set this up. The Lannisters could (but won't) do this with the Darrys for the same reason, because even though Lancel is not of Tywin's line, he is still a Lannister