Hello Martini,
Yes, there is most certainly an albergue in Ullastrella. It is called “JORDI SANS” and is located at C. 1 d'Octubre, around the corner from the municipal office/town hall. The keys are available from the Ayuntamiento/Town Hall (Tel. 937-887-262) from Monday to Friday from 9:00 to 2:00 and Wednesdays from 5:00 to 8:00 as well as at the Bar del Casal Cultural (Tel. 937-331-051) Mondays from 4:00 to 8:00 and Tuesdays to Sundays from 2:00 to 11:00. The albergue is equipped with a microwave and fridge but no kitchen sink and costs 5 euros. I stayed there this spring (i.e., 2019) as well as once last year.
I have never stayed in Selgua, but have stayed in Monzon where there are spaces available for pilgrims in a local sports centre/hostel. It is mandatory to reserve in advance in order to stay there. A very clean, comfortable modern facility with a great kitchen. Let me know if you need the contact details (or you might find it listed on Gronze.com).
I have now walked this route twice (from Barcelona) so feel free to ask me for any other information you might need.