Is there any meaningful difference in acidity level between beer styles? I would guess that a Porter pH is higher than for an IPA, because of alpha acids or other acids from the hops. I also heard that it can heavily  depend on the acidity of the water used. 

But anyway, are those pH differences really significant in the final product ? For instance, if I have an ulcer, would it be worse to drink some type of beer rather than an other ?
Sure, there are major differences in acidity. Unsurprisingly, the sour beer styles can have very low pH levels. Here's an example of someone measuring the pH of sour beers and finding that even within that category there are significant differences. Here's a short presentation showing that expected pH ranges from 3.2-3.4 for Berliner Weisse to 4.5-4.8 for pilsner and bock. So, yes, there are definitely major differences, and they do matter to the perception of the finished product. At the most obvious level, low-pH beers actually taste sour. There are also indications that smaller pH variations matter to how people perceive the flavour.