I expect they could, if absolutely neccesary, but only in extreme circumstances as HMS Ocean would restrict the B to only VTOL ops meaning that the amount of munitions + fuel it can carry is very limited (at least, that's my understanding of issues with vertical take-offs)
Also, would the deck be able to cope with F35B VTOL ops? I've read a few reports about people being concerned about the deck of USS Wasp so wouldn't HMS Ocean be more vunerable? After all, i wouldn't have thought the flight deck on Ocean would have been designed to be as robust as Wasps'
EDIT: A quick scan over Wiki, seems Ocean was described as being able to 'carry, but not operate' Harriers, so no chance for the F35B - if it's correct however.