Yep, that's what it means, and yes, it can be used for a girl. It's practically unheard of on a boy, actually. The stats from INE.es says that there have been 83 male Spanish nationals born since about the 1920s, and the majority of those born in the past 10 years, and almost half weren't actually born in Spain.
For girls, there have been 10,266 born since the '20s, and really only picked up in the past 20 years (6,404 born in 2000-2009, vs the 48 born in 1950-1959). It's more of a Catalan name it's a lot more more densely chosen in Catalonia, the Valencian Community and the Balearic Islands than in the rest of Spain, but it has actually been used in every province. Mar for a boy has only been used in Barcelona and Valencia (the provinces).